<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>ACE: Riferimenti per il file handler.cc</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.ico"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">ACE
   </div>
   <div id="projectbrief">Gestionale Circolo Tennis</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generato da Doxygen 1.8.1.2 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Cerca');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Pagina&#160;Principale</span></a></li>
      <li><a href="annotated.html"><span>Classi</span></a></li>
      <li class="current"><a href="files.html"><span>File</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Cerca" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Elenco&#160;dei&#160;file</span></a></li>
      <li><a href="globals.html"><span>Elementi&#160;dei&#160;file</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>Tutto</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classi</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>File</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Funzioni</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variabili</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Ridefinizioni di tipo (typedef)</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Tipi enumerati (enum)</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Valori del tipo enumerato</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Definizioni</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pagine</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Definizioni</a> &#124;
<a href="#enum-members">Tipi enumerati (enum)</a> &#124;
<a href="#func-members">Funzioni</a> &#124;
<a href="#var-members">Variabili</a>  </div>
  <div class="headertitle">
<div class="title">Riferimenti per il file handler.cc</div>  </div>
</div><!--header-->
<div class="contents">

<p>File contentente il modulo handler.  
<a href="#details">Continua...</a></p>
<div class="textblock"><code>#include &lt;gtk/gtk.h&gt;</code><br/>
<code>#include &lt;glib.h&gt;</code><br/>
<code>#include &lt;glib-object.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="handler_8h_source.html">handler.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="struttura__dati_8h_source.html">struttura_dati.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="accesso__dati_8h_source.html">accesso_dati.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="file__IO_8h_source.html">file_IO.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="debug_8h_source.html">debug.h</a>&quot;</code><br/>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="define-members"></a>
Definizioni</h2></td></tr>
<tr class="memitem:a95a01084740ad1073c35012600beada7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a95a01084740ad1073c35012600beada7">STRINGA_ORARIO</a>(int)&#160;&#160;&#160;g_strdup_printf(&quot;%02d:%02d&quot;, (int / 60), (int % 60) )</td></tr>
<tr class="memdesc:a95a01084740ad1073c35012600beada7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Trsforma un intero in una stringa orario.  <a href="#a95a01084740ad1073c35012600beada7"></a><br/></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="enum-members"></a>
Tipi enumerati (enum)</h2></td></tr>
<tr class="memitem:ad2ef6a61f674ffd893c018201b796901"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#ad2ef6a61f674ffd893c018201b796901">tipo_ora</a> { <a class="el" href="handler_8cc.html#ad2ef6a61f674ffd893c018201b796901a103e268eeab0324c0d636174572035c5">VUOTA</a>, 
<a class="el" href="handler_8cc.html#ad2ef6a61f674ffd893c018201b796901a650770b03fcc1dfe25b5dc72d7bb97e8">PRENOTATA</a>
 }</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="func-members"></a>
Funzioni</h2></td></tr>
<tr class="memitem:a5cd77391ccb43a307314fc973742ed31"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a5cd77391ccb43a307314fc973742ed31">controllo_estensione</a> (char *&amp;file, const char *estensione)</td></tr>
<tr class="memdesc:a5cd77391ccb43a307314fc973742ed31"><td class="mdescLeft">&#160;</td><td class="mdescRight">Controlla l'estensione del file.  <a href="#a5cd77391ccb43a307314fc973742ed31"></a><br/></td></tr>
<tr class="memitem:a516736f14e3e848624813322492e3561"><td class="memItemLeft" align="right" valign="top">static char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a516736f14e3e848624813322492e3561">get_current_name</a> (GtkFileChooser *chooser)</td></tr>
<tr class="memdesc:a516736f14e3e848624813322492e3561"><td class="mdescLeft">&#160;</td><td class="mdescRight">Ritorna il nome del file del FileChooser.  <a href="#a516736f14e3e848624813322492e3561"></a><br/></td></tr>
<tr class="memitem:a8bf2479da80daf509d7af3dca324e92c"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a8bf2479da80daf509d7af3dca324e92c">insert_list_giocatore</a> (gpointer data_, gpointer list_)</td></tr>
<tr class="memdesc:a8bf2479da80daf509d7af3dca324e92c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inserisce il giocatore nella ListStore.  <a href="#a8bf2479da80daf509d7af3dca324e92c"></a><br/></td></tr>
<tr class="memitem:a332b65c4735ded9b047d074bb8f2639b"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a332b65c4735ded9b047d074bb8f2639b">insert_list_campi</a> (gpointer data_, gpointer list_)</td></tr>
<tr class="memdesc:a332b65c4735ded9b047d074bb8f2639b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inserisce il campo nella ListStore.  <a href="#a332b65c4735ded9b047d074bb8f2639b"></a><br/></td></tr>
<tr class="memitem:a3dfb1abf80d66926a17e6065559ea726"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a3dfb1abf80d66926a17e6065559ea726">inserisci_righe_campi</a> (gpointer campo_, gpointer tabella_)</td></tr>
<tr class="memdesc:a3dfb1abf80d66926a17e6065559ea726"><td class="mdescLeft">&#160;</td><td class="mdescRight">Aggiunge alla tabella le righe dei campi.  <a href="#a3dfb1abf80d66926a17e6065559ea726"></a><br/></td></tr>
<tr class="memitem:a3b9e5487e0942b6b558d5b19a39fbc2d"><td class="memItemLeft" align="right" valign="top">static char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a3b9e5487e0942b6b558d5b19a39fbc2d">get_stringa_data</a> (GtkCalendar *calendario)</td></tr>
<tr class="memdesc:a3b9e5487e0942b6b558d5b19a39fbc2d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Restituisce una stringa con la data.  <a href="#a3b9e5487e0942b6b558d5b19a39fbc2d"></a><br/></td></tr>
<tr class="memitem:a1f004e54cac4b7773c81f83c79e8999a"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a1f004e54cac4b7773c81f83c79e8999a">controlla_disponibilita_ora</a> (<a class="el" href="structcampo__t.html">campo_t</a> *campo, int orario, int durata)</td></tr>
<tr class="memdesc:a1f004e54cac4b7773c81f83c79e8999a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Controlla se un ora è disponibile.  <a href="#a1f004e54cac4b7773c81f83c79e8999a"></a><br/></td></tr>
<tr class="memitem:ac8a9536dc4693a966d4e0023e4d745c6"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#ac8a9536dc4693a966d4e0023e4d745c6">distruggi_cella_se_interna</a> (GtkWidget *widget, gpointer container)</td></tr>
<tr class="memdesc:ac8a9536dc4693a966d4e0023e4d745c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Distrugge la cella del container se non fa parte della struttara esterna.  <a href="#ac8a9536dc4693a966d4e0023e4d745c6"></a><br/></td></tr>
<tr class="memitem:aafd920a801e75d4ca88223fb492d3ba2"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#aafd920a801e75d4ca88223fb492d3ba2">inserisci_ore_vuote</a> (int inizio, int fine, GtkGrid *tabella, <a class="el" href="structcampo__t.html">campo_t</a> *campo)</td></tr>
<tr class="memdesc:aafd920a801e75d4ca88223fb492d3ba2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inserisce ore vuote nella tabella.  <a href="#aafd920a801e75d4ca88223fb492d3ba2"></a><br/></td></tr>
<tr class="memitem:aa1ebd22d0b9b412732437f261124f538"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#aa1ebd22d0b9b412732437f261124f538">controlla_formato_ora</a> (const char *data)</td></tr>
<tr class="memdesc:aa1ebd22d0b9b412732437f261124f538"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converte una stringa rappresentante un orario in intero.  <a href="#aa1ebd22d0b9b412732437f261124f538"></a><br/></td></tr>
<tr class="memitem:abef113ade0ebf32552faf22013fb51e6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#abef113ade0ebf32552faf22013fb51e6">mostra_finestra</a> (GtkMenuItem *actived, gpointer finestra)</td></tr>
<tr class="memdesc:abef113ade0ebf32552faf22013fb51e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mostra a video la finestra.  <a href="#abef113ade0ebf32552faf22013fb51e6"></a><br/></td></tr>
<tr class="memitem:a3cea95cc33a7419edc4bc03872da2c2c"><td class="memItemLeft" align="right" valign="top">gboolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a3cea95cc33a7419edc4bc03872da2c2c">nascondi_finestra</a> (GtkWidget *widget, GdkEvent *event, gpointer user_data)</td></tr>
<tr class="memdesc:a3cea95cc33a7419edc4bc03872da2c2c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Nasconde la finestra.  <a href="#a3cea95cc33a7419edc4bc03872da2c2c"></a><br/></td></tr>
<tr class="memitem:a8713b519a311ec08fc899e7fa176f963"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a8713b519a311ec08fc899e7fa176f963">finestra_errore</a> (const char messaggio[])</td></tr>
<tr class="memdesc:a8713b519a311ec08fc899e7fa176f963"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mostra una finestra di errore.  <a href="#a8713b519a311ec08fc899e7fa176f963"></a><br/></td></tr>
<tr class="memitem:a242b4c7315a053af14f55798531abfeb"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a242b4c7315a053af14f55798531abfeb">alert</a> (const char messaggio[])</td></tr>
<tr class="memdesc:a242b4c7315a053af14f55798531abfeb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mostra una finestra di dialogo con i pulsanti SI e NO.  <a href="#a242b4c7315a053af14f55798531abfeb"></a><br/></td></tr>
<tr class="memitem:a1327446bd6ffbd129400ab552dfba9d0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a1327446bd6ffbd129400ab552dfba9d0">socio_toggle</a> (GtkToggleButton *button, gpointer user_data)</td></tr>
<tr class="memdesc:a1327446bd6ffbd129400ab552dfba9d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modifica i campi in base al bottone.  <a href="#a1327446bd6ffbd129400ab552dfba9d0"></a><br/></td></tr>
<tr class="memitem:a8286acf71d1039361e5401bcd560fa05"><td class="memItemLeft" align="right" valign="top">gboolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a8286acf71d1039361e5401bcd560fa05">handler_esci</a> (GtkWidget *widget, GdkEvent *event, gpointer user_data)</td></tr>
<tr class="memdesc:a8286acf71d1039361e5401bcd560fa05"><td class="mdescLeft">&#160;</td><td class="mdescRight">Esce dal programma.  <a href="#a8286acf71d1039361e5401bcd560fa05"></a><br/></td></tr>
<tr class="memitem:a258ab9e0f53bf7ca6ceff4985b713cc9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a258ab9e0f53bf7ca6ceff4985b713cc9">set_active</a> (GtkWidget *widget, gpointer user_data)</td></tr>
<tr class="memdesc:a258ab9e0f53bf7ca6ceff4985b713cc9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Setta sul primo elemento il ComboBox.  <a href="#a258ab9e0f53bf7ca6ceff4985b713cc9"></a><br/></td></tr>
<tr class="memitem:ac17b4a4911f229ea2ba71dfac6ed1688"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#ac17b4a4911f229ea2ba71dfac6ed1688">handler_annulla</a> (GtkButton *button, gpointer user_data)</td></tr>
<tr class="memdesc:ac17b4a4911f229ea2ba71dfac6ed1688"><td class="mdescLeft">&#160;</td><td class="mdescRight">Chiude la finestra.  <a href="#ac17b4a4911f229ea2ba71dfac6ed1688"></a><br/></td></tr>
<tr class="memitem:a1855f2711061454499303f82de47ff24"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a1855f2711061454499303f82de47ff24">handler_nuovo_giocatore</a> (GtkMenuItem *item, gpointer giocatore_)</td></tr>
<tr class="memdesc:a1855f2711061454499303f82de47ff24"><td class="mdescLeft">&#160;</td><td class="mdescRight">Setta i campi della finestra agg_giocatore.  <a href="#a1855f2711061454499303f82de47ff24"></a><br/></td></tr>
<tr class="memitem:ac75d3e710277af666e435741cf424851"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#ac75d3e710277af666e435741cf424851">handler_visualizza_giocatore</a> (GtkButton *button, gpointer user_data)</td></tr>
<tr class="memdesc:ac75d3e710277af666e435741cf424851"><td class="mdescLeft">&#160;</td><td class="mdescRight">Visualizza il giocatore selezionato.  <a href="#ac75d3e710277af666e435741cf424851"></a><br/></td></tr>
<tr class="memitem:ac26586ea6efeec6681706d1a8775adc0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#ac26586ea6efeec6681706d1a8775adc0">handler_aggiungi_giocatore</a> (GtkButton *button, gpointer user_data)</td></tr>
<tr class="memdesc:ac26586ea6efeec6681706d1a8775adc0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Aggiunge/Modifica con i campi inseriri il giocatore.  <a href="#ac26586ea6efeec6681706d1a8775adc0"></a><br/></td></tr>
<tr class="memitem:af7e31c6ad8bb85081abc321db03c1a2b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#af7e31c6ad8bb85081abc321db03c1a2b">handler_inizializza_cir</a> (GtkButton *button, gpointer user_data)</td></tr>
<tr class="memdesc:af7e31c6ad8bb85081abc321db03c1a2b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Crea un nuovo circolo con i campi inseriti.  <a href="#af7e31c6ad8bb85081abc321db03c1a2b"></a><br/></td></tr>
<tr class="memitem:a5f471e1128fa122a4509ca3864973ac6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a5f471e1128fa122a4509ca3864973ac6">handler_nuovo_campo</a> (GtkMenuItem *item, gpointer campo_)</td></tr>
<tr class="memdesc:a5f471e1128fa122a4509ca3864973ac6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Setta i campi della finestra agg_campo.  <a href="#a5f471e1128fa122a4509ca3864973ac6"></a><br/></td></tr>
<tr class="memitem:a2a4e6d3e35ade8b29eee9e145a389599"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a2a4e6d3e35ade8b29eee9e145a389599">handler_visualizza_campo</a> (GtkButton *button, gpointer user_data)</td></tr>
<tr class="memdesc:a2a4e6d3e35ade8b29eee9e145a389599"><td class="mdescLeft">&#160;</td><td class="mdescRight">Visualizza il campo selezionato.  <a href="#a2a4e6d3e35ade8b29eee9e145a389599"></a><br/></td></tr>
<tr class="memitem:ab161e7dfc521058bc5bd03f723a106a8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#ab161e7dfc521058bc5bd03f723a106a8">aggiorna_tabella_ore</a> (GtkCalendar *calendario, gpointer user_data)</td></tr>
<tr class="memdesc:ab161e7dfc521058bc5bd03f723a106a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Aggiorna la tabella delle ore.  <a href="#ab161e7dfc521058bc5bd03f723a106a8"></a><br/></td></tr>
<tr class="memitem:a952e1263d42c2a3e4df7cb4189d52379"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a952e1263d42c2a3e4df7cb4189d52379">disegna_tabella_ore</a> ()</td></tr>
<tr class="memdesc:a952e1263d42c2a3e4df7cb4189d52379"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disegna la base della tabella ore.  <a href="#a952e1263d42c2a3e4df7cb4189d52379"></a><br/></td></tr>
<tr class="memitem:aab2674f9e310187d1f2718e13a440729"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#aab2674f9e310187d1f2718e13a440729">handler_mostra_ora</a> (GtkButton *button, gpointer user_data)</td></tr>
<tr class="memdesc:aab2674f9e310187d1f2718e13a440729"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mostra i dati dell'ora.  <a href="#aab2674f9e310187d1f2718e13a440729"></a><br/></td></tr>
<tr class="memitem:aec22e99260660fa8b092cf2cd98ff945"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#aec22e99260660fa8b092cf2cd98ff945">handler_prenota_ora</a> (GtkButton *button, gpointer user_data)</td></tr>
<tr class="memdesc:aec22e99260660fa8b092cf2cd98ff945"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prenota un ora in base ai dati inseriti.  <a href="#aec22e99260660fa8b092cf2cd98ff945"></a><br/></td></tr>
<tr class="memitem:a98d459bf3ec2ccdc08f817e8e0968eda"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a98d459bf3ec2ccdc08f817e8e0968eda">handler_aggiungi_campo</a> (GtkButton *button, gpointer user_data)</td></tr>
<tr class="memdesc:a98d459bf3ec2ccdc08f817e8e0968eda"><td class="mdescLeft">&#160;</td><td class="mdescRight">Aggiunge/Modifica con i campi inseriri il campo.  <a href="#a98d459bf3ec2ccdc08f817e8e0968eda"></a><br/></td></tr>
<tr class="memitem:aded29031447ee02a9663617b8f55f5b0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#aded29031447ee02a9663617b8f55f5b0">handler_apri_circolo</a> (GtkMenuItem *button, gpointer user_data)</td></tr>
<tr class="memdesc:aded29031447ee02a9663617b8f55f5b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Crea l'elenco dei circoli caricabili e lo mostra.  <a href="#aded29031447ee02a9663617b8f55f5b0"></a><br/></td></tr>
<tr class="memitem:ad40d4d29e5f9fb374a70fbe0782de844"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#ad40d4d29e5f9fb374a70fbe0782de844">handler_carica_circolo</a> (GtkButton *button, gpointer user_data)</td></tr>
<tr class="memdesc:ad40d4d29e5f9fb374a70fbe0782de844"><td class="mdescLeft">&#160;</td><td class="mdescRight">Carica il circolo selezionato.  <a href="#ad40d4d29e5f9fb374a70fbe0782de844"></a><br/></td></tr>
<tr class="memitem:ae4e35b5616a0c03b917a249c90559c6f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#ae4e35b5616a0c03b917a249c90559c6f">handler_backup</a> (GtkMenuItem *button, gpointer user_data)</td></tr>
<tr class="memdesc:ae4e35b5616a0c03b917a249c90559c6f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mostra la finestra per il salvataggio del backup.  <a href="#ae4e35b5616a0c03b917a249c90559c6f"></a><br/></td></tr>
<tr class="memitem:a0a32ee04423fecb673625467453ff022"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a0a32ee04423fecb673625467453ff022">handler_ripristina</a> (GtkMenuItem *button, gpointer user_data)</td></tr>
<tr class="memdesc:a0a32ee04423fecb673625467453ff022"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mostra la finestra per il ripristino di un backup.  <a href="#a0a32ee04423fecb673625467453ff022"></a><br/></td></tr>
<tr class="memitem:a9548c9622a866b65c0edaa564709569e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a9548c9622a866b65c0edaa564709569e">handler_file_ok</a> (GtkWidget *widget, GdkEvent *event, gpointer user_data)</td></tr>
<tr class="memdesc:a9548c9622a866b65c0edaa564709569e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Controlla il nome del file selezionato per controllarne l'estensione.  <a href="#a9548c9622a866b65c0edaa564709569e"></a><br/></td></tr>
<tr class="memitem:ae54e9229d008986ba7fa4c4684e2e8cc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#ae54e9229d008986ba7fa4c4684e2e8cc">handler_elenco_giocatori</a> (GtkMenuItem *button, gpointer user_data)</td></tr>
<tr class="memdesc:ae54e9229d008986ba7fa4c4684e2e8cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Visualizza l'elenco dei giocatori.  <a href="#ae54e9229d008986ba7fa4c4684e2e8cc"></a><br/></td></tr>
<tr class="memitem:a639967c965bffe9ce114421fc755c2c8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a639967c965bffe9ce114421fc755c2c8">handler_elenco_soci</a> (GtkMenuItem *button, gpointer user_data)</td></tr>
<tr class="memdesc:a639967c965bffe9ce114421fc755c2c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Visualizza l'elenco dei soci.  <a href="#a639967c965bffe9ce114421fc755c2c8"></a><br/></td></tr>
<tr class="memitem:a5b268caeacbd48bffabc35d7db9726e8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a5b268caeacbd48bffabc35d7db9726e8">handler_elenco_campi</a> (GtkMenuItem *button, gpointer user_data)</td></tr>
<tr class="memdesc:a5b268caeacbd48bffabc35d7db9726e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Visualizza l'elenco dei campi.  <a href="#a5b268caeacbd48bffabc35d7db9726e8"></a><br/></td></tr>
<tr class="memitem:a8e8ff4a92a5e36caf50e67d3b8e8c479"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a8e8ff4a92a5e36caf50e67d3b8e8c479">handler_elimina_ora</a> (GtkButton *button, gpointer user_data)</td></tr>
<tr class="memdesc:a8e8ff4a92a5e36caf50e67d3b8e8c479"><td class="mdescLeft">&#160;</td><td class="mdescRight">Elimina l'ora identificata dalla cella.  <a href="#a8e8ff4a92a5e36caf50e67d3b8e8c479"></a><br/></td></tr>
<tr class="memitem:a37d8fb1647e44c328835c9b48ea379d2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a37d8fb1647e44c328835c9b48ea379d2">handler_elimina_campo</a> (GtkButton *button, gpointer user_data)</td></tr>
<tr class="memdesc:a37d8fb1647e44c328835c9b48ea379d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Elimina il campo selezionato.  <a href="#a37d8fb1647e44c328835c9b48ea379d2"></a><br/></td></tr>
<tr class="memitem:a38852a03eed259563c4c9c3e5da5f72d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a38852a03eed259563c4c9c3e5da5f72d">handler_elimina_giocatore</a> (GtkButton *button, gpointer user_data)</td></tr>
<tr class="memdesc:a38852a03eed259563c4c9c3e5da5f72d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Elimina il giocatore selezionato.  <a href="#a38852a03eed259563c4c9c3e5da5f72d"></a><br/></td></tr>
<tr class="memitem:ae2b24768fc6d42406937fb283c9992ae"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#ae2b24768fc6d42406937fb283c9992ae">handler_elimina_circolo</a> (GtkButton *button, gpointer user_data)</td></tr>
<tr class="memdesc:ae2b24768fc6d42406937fb283c9992ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Elimina il circolo selezionato.  <a href="#ae2b24768fc6d42406937fb283c9992ae"></a><br/></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="var-members"></a>
Variabili</h2></td></tr>
<tr class="memitem:a25e58c3375b9bff39382bbe4c77c9355"><td class="memItemLeft" align="right" valign="top">GtkBuilder *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a></td></tr>
<tr class="memitem:a4498167a41f7467a5dddeb2bfaea59b6"><td class="memItemLeft" align="right" valign="top">const char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a4498167a41f7467a5dddeb2bfaea59b6">DATA_PATH</a> []</td></tr>
<tr class="memitem:afdb5d4cc28256fee3f79b189c6a6ef58"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcircolo__t.html">circolo_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a></td></tr>
<tr class="memitem:a13fe06ea7d409828447a956f7e130977"><td class="memItemLeft" align="right" valign="top">const char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a13fe06ea7d409828447a956f7e130977">ESTENSIONE_BACKUP</a> [] = &quot;.abk&quot;</td></tr>
<tr class="memitem:a8333082ae85ce61a16c133d8da371716"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a8333082ae85ce61a16c133d8da371716">coperture</a> [] = {&quot;INDOOR&quot;, &quot;<a class="el" href="struttura__dati_8h.html#ad0f5a2191c29d4cd4c52506513493755a8c38e218bbbd030490bf90a71baad2b9">OUTDOOR</a>&quot;}</td></tr>
<tr class="memitem:a951a8018f2da583e7a03b930fc58e237"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#a951a8018f2da583e7a03b930fc58e237">terreni</a> [] = {&quot;ERBA&quot;, &quot;<a class="el" href="struttura__dati_8h.html#a0c12af1750520ca1d5e0a1b120ed33b7a772329657a044e6e767b6016feb1e23c">ERBA</a> SINTETICA&quot;, &quot;<a class="el" href="struttura__dati_8h.html#a0c12af1750520ca1d5e0a1b120ed33b7af716ec1950763e4a93a6a0b029dc9ca5">TERRA</a>&quot;, &quot;<a class="el" href="struttura__dati_8h.html#a0c12af1750520ca1d5e0a1b120ed33b7a6846ea149ed5fe29f199e562567a1ddb">SINTETICO</a>&quot;, &quot;<a class="el" href="struttura__dati_8h.html#a0c12af1750520ca1d5e0a1b120ed33b7ae110ec4d5d1ec9bff232bf97b86c8a5a">CEMENTO</a>&quot;}</td></tr>
<tr class="memitem:afd4f3203e7d93c11312acfb3bd818b4d"><td class="memItemLeft" align="right" valign="top">const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#afd4f3203e7d93c11312acfb3bd818b4d">ORA_APERTURA</a> = 8</td></tr>
<tr class="memitem:af45dc783e55c4fd9bcebf41135fe5da9"><td class="memItemLeft" align="right" valign="top">const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="handler_8cc.html#af45dc783e55c4fd9bcebf41135fe5da9">ORA_CHIUSURA</a> = 23</td></tr>
</table>
<a name="details" id="details"></a><h2>Descrizione dettagliata</h2>
<div class="textblock"><p>File contentente il modulo handler. </p>
<p>Fornisce gli handler chiamati dall'interfaccia grafica al verificarsi degli eventi </p>
</div><h2>Documentazione delle definizioni</h2>
<a class="anchor" id="a95a01084740ad1073c35012600beada7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define STRINGA_ORARIO</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">int</td><td>)</td>
          <td>&#160;&#160;&#160;g_strdup_printf(&quot;%02d:%02d&quot;, (int / 60), (int % 60) )</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Trsforma un intero in una stringa orario. </p>
<p>Prende l'intero rappresentate i minuti totali e lo converte in una stringa del formato hh:mm </p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">int</td><td>Intero rappresentante i minuti </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Restituisce</dt><dd>Stringa </dd></dl>

</div>
</div>
<h2>Documentazione dei tipi enumerati</h2>
<a class="anchor" id="ad2ef6a61f674ffd893c018201b796901"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="handler_8cc.html#ad2ef6a61f674ffd893c018201b796901">tipo_ora</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl><dt><b>Valori del tipo enumerato: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="ad2ef6a61f674ffd893c018201b796901a103e268eeab0324c0d636174572035c5"></a>VUOTA</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ad2ef6a61f674ffd893c018201b796901a650770b03fcc1dfe25b5dc72d7bb97e8"></a>PRENOTATA</em>&nbsp;</td><td>
</td></tr>
</table>
</dd>
</dl>
<div class="fragment"><div class="line">{ <a class="code" href="handler_8cc.html#ad2ef6a61f674ffd893c018201b796901a103e268eeab0324c0d636174572035c5">VUOTA</a>, <a class="code" href="handler_8cc.html#ad2ef6a61f674ffd893c018201b796901a650770b03fcc1dfe25b5dc72d7bb97e8">PRENOTATA</a> };   </div>
</div><!-- fragment -->
</div>
</div>
<h2>Documentazione delle funzioni</h2>
<a class="anchor" id="ab161e7dfc521058bc5bd03f723a106a8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void aggiorna_tabella_ore </td>
          <td>(</td>
          <td class="paramtype">GtkCalendar *&#160;</td>
          <td class="paramname"><em>calendario</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Aggiorna la tabella delle ore. </p>
<p>Colloca ogni ora nel giusto orario </p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">calendario</td><td>Calandario da cui prendere la data </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line">{</div>
<div class="line">        <span class="keywordflow">if</span> (!calendario)</div>
<div class="line">                calendario = GTK_CALENDAR( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;calendario&quot;</span>) );</div>
<div class="line"></div>
<div class="line">        GtkContainer *cont_tabella = GTK_CONTAINER( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;tabella_ore&quot;</span>) );</div>
<div class="line">        GList *figli = gtk_container_get_children(cont_tabella);</div>
<div class="line">        GtkGrid *tabella = GTK_GRID(figli-&gt;data);</div>
<div class="line"></div>
<div class="line">        gtk_container_foreach( GTK_CONTAINER(tabella), <a class="code" href="handler_8cc.html#ac8a9536dc4693a966d4e0023e4d745c6" title="Distrugge la cella del container se non fa parte della struttara esterna.">distruggi_cella_se_interna</a>, tabella);</div>
<div class="line">        </div>
<div class="line">        <span class="keywordtype">char</span> *data = <a class="code" href="handler_8cc.html#a3b9e5487e0942b6b558d5b19a39fbc2d" title="Restituisce una stringa con la data.">get_stringa_data</a>(calendario);</div>
<div class="line">        <a class="code" href="debug_8h.html#afff1e38d74b3116b7a77d0272adf2dbf" title="Mostra i vari passaggi fondamentali.">D1</a>(cout&lt;&lt;<span class="stringliteral">&quot;Giorno aquisito&quot;</span>&lt;&lt;endl)       </div>
<div class="line"></div>
<div class="line">        GList *tmp_c = <a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>-&gt;campi;</div>
<div class="line">        while(tmp_c != NULL){</div>
<div class="line">                <a class="code" href="structcampo__t.html" title="Struttura rappresentate i campi.">campo_t</a> *campo = (<a class="code" href="structcampo__t.html" title="Struttura rappresentate i campi.">campo_t</a> *) tmp_c-&gt;data;</div>
<div class="line"></div>
<div class="line">                <span class="keywordtype">int</span> inizio = 0;</div>
<div class="line">                <span class="keywordtype">int</span> fine = 0; </div>
<div class="line">                GList *tmp_o = campo-&gt;<a class="code" href="structcampo__t.html#aab5d62794b2dd7a9ca1b2db014d70702">ore</a>;</div>
<div class="line">                <span class="keywordflow">while</span>(tmp_o != NULL){</div>
<div class="line">                        <a class="code" href="structora__t.html" title="Struttura rappresentante le ore prenotate.">ora_t</a> *ora = (<a class="code" href="structora__t.html" title="Struttura rappresentante le ore prenotate.">ora_t</a> *) tmp_o-&gt;<a class="code" href="structora__t.html#a39c8c649c092efd6aa20c0f9bb6bc437">data</a>;</div>
<div class="line">                        if ( g_strcmp0(ora-&gt;<a class="code" href="structora__t.html#a39c8c649c092efd6aa20c0f9bb6bc437">data</a>-&gt;str, data) == 0 ){</div>
<div class="line"></div>
<div class="line">                                <span class="comment">//Crea un bottone contente dati utili e lo inserisce nella tabella</span></div>
<div class="line">                                <span class="keyword">const</span> <span class="keywordtype">char</span> *nome = <a class="code" href="accesso__dati_8cc.html#ac8878839cd059af1d8b17b2a466914b5" title="Restituisce il nome associato all&#39;ora.">get_nome_ora</a>(ora);</div>
<div class="line">                                GtkWidget *etichetta = GTK_WIDGET( gtk_button_new_with_label(nome) );</div>
<div class="line">                                g_signal_connect(etichetta, <span class="stringliteral">&quot;clicked&quot;</span>, G_CALLBACK(<a class="code" href="handler_8cc.html#aab2674f9e310187d1f2718e13a440729" title="Mostra i dati dell&#39;ora.">handler_mostra_ora</a>), ora);</div>
<div class="line">                                g_object_set_data( G_OBJECT(etichetta), <span class="stringliteral">&quot;campo&quot;</span>, campo);</div>
<div class="line">                                g_object_set_data( G_OBJECT(etichetta), <span class="stringliteral">&quot;tipo_ora&quot;</span>, GINT_TO_POINTER(<a class="code" href="handler_8cc.html#ad2ef6a61f674ffd893c018201b796901a650770b03fcc1dfe25b5dc72d7bb97e8">PRENOTATA</a>) );</div>
<div class="line">                                g_object_set_data( G_OBJECT(etichetta), <span class="stringliteral">&quot;ora&quot;</span>, ora);</div>
<div class="line"></div>
<div class="line">                                fine = ora-&gt;<a class="code" href="structora__t.html#aa0a139446f6b1e6d08ad37d2f7de8125">orario</a> - (<a class="code" href="handler_8cc.html#afd4f3203e7d93c11312acfb3bd818b4d">ORA_APERTURA</a>*60);</div>
<div class="line">                                <a class="code" href="handler_8cc.html#aafd920a801e75d4ca88223fb492d3ba2" title="Inserisce ore vuote nella tabella.">inserisci_ore_vuote</a>(inizio, fine, tabella, campo);</div>
<div class="line">                                inizio = (ora-&gt;<a class="code" href="structora__t.html#aa0a139446f6b1e6d08ad37d2f7de8125">orario</a>)+(ora-&gt;<a class="code" href="structora__t.html#abd8b8cd2025d6d097f5a415868ccbd68">durata</a>)-(<a class="code" href="handler_8cc.html#afd4f3203e7d93c11312acfb3bd818b4d">ORA_APERTURA</a>*60);</div>
<div class="line">                                </div>
<div class="line">                                gtk_grid_attach(tabella, etichetta, (ora-&gt;<a class="code" href="structora__t.html#aa0a139446f6b1e6d08ad37d2f7de8125">orario</a>-(<a class="code" href="handler_8cc.html#afd4f3203e7d93c11312acfb3bd818b4d">ORA_APERTURA</a>-1)*60), campo-&gt;<a class="code" href="structcampo__t.html#a6e0a6002a8c0d360f22d4a30bc1e37d0">numero</a>, ora-&gt;<a class="code" href="structora__t.html#abd8b8cd2025d6d097f5a415868ccbd68">durata</a>, 1);</div>
<div class="line">                        }</div>
<div class="line">                        </div>
<div class="line">                        tmp_o = g_list_next(tmp_o);</div>
<div class="line">                }</div>
<div class="line">        </div>
<div class="line">                fine = (<a class="code" href="handler_8cc.html#af45dc783e55c4fd9bcebf41135fe5da9">ORA_CHIUSURA</a> - <a class="code" href="handler_8cc.html#afd4f3203e7d93c11312acfb3bd818b4d">ORA_APERTURA</a>)*60;</div>
<div class="line">                <a class="code" href="handler_8cc.html#aafd920a801e75d4ca88223fb492d3ba2" title="Inserisce ore vuote nella tabella.">inserisci_ore_vuote</a>(inizio, fine, tabella, campo);</div>
<div class="line"></div>
<div class="line">                tmp_c = g_list_next(tmp_c);</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        g_free(data);</div>
<div class="line"></div>
<div class="line">        gtk_widget_show_all( GTK_WIDGET(cont_tabella) );</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a242b4c7315a053af14f55798531abfeb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool alert </td>
          <td>(</td>
          <td class="paramtype">const char&#160;</td>
          <td class="paramname"><em>messaggio</em>[]</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Mostra una finestra di dialogo con i pulsanti SI e NO. </p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">messaggio</td><td>Messaggio da mostrare </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Restituisce</dt><dd>Pulsante premuto TRUE = SI, FALSE = NO </dd></dl>
<div class="fragment"><div class="line">{</div>
<div class="line">        gint response;</div>
<div class="line"></div>
<div class="line">        GtkWidget *window = GTK_WIDGET( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;alert&quot;</span>) );</div>
<div class="line">        GtkLabel *errore = GTK_LABEL( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;alert_m&quot;</span>) );</div>
<div class="line">        gtk_label_set_text(errore, messaggio);</div>
<div class="line">        gtk_widget_show_all(window);</div>
<div class="line"></div>
<div class="line">        response = gtk_dialog_run( GTK_DIALOG(window) );</div>
<div class="line">        <span class="keywordflow">if</span> (response == GTK_RESPONSE_YES){</div>
<div class="line">                <a class="code" href="handler_8cc.html#a3cea95cc33a7419edc4bc03872da2c2c" title="Nasconde la finestra.">nascondi_finestra</a>(window, NULL, NULL);</div>
<div class="line">                <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        <a class="code" href="handler_8cc.html#a3cea95cc33a7419edc4bc03872da2c2c" title="Nasconde la finestra.">nascondi_finestra</a>(window, NULL, NULL);</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a1f004e54cac4b7773c81f83c79e8999a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool controlla_disponibilita_ora </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcampo__t.html">campo_t</a> *&#160;</td>
          <td class="paramname"><em>campo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>orario</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>durata</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Controlla se un ora è disponibile. </p>
<p>Controlla che la combinazione ora durata non vada in conflitto con ore già prenotate </p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">campo</td><td>Campo </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">orario</td><td>Orario </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">durata</td><td>Durata </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Restituisce</dt><dd>Risultato del test </dd></dl>
<div class="fragment"><div class="line">{</div>
<div class="line">        GList *tmp = campo-&gt;<a class="code" href="structcampo__t.html#aab5d62794b2dd7a9ca1b2db014d70702">ore</a>;</div>
<div class="line">        <span class="keywordflow">while</span>(tmp != 0){</div>
<div class="line">                <a class="code" href="structora__t.html" title="Struttura rappresentante le ore prenotate.">ora_t</a> *ora = (<a class="code" href="structora__t.html" title="Struttura rappresentante le ore prenotate.">ora_t</a> *) tmp-&gt;<a class="code" href="structora__t.html#a39c8c649c092efd6aa20c0f9bb6bc437">data</a>;</div>
<div class="line">                if ( (orario &lt; ora-&gt;orario + ora-&gt;<a class="code" href="structora__t.html#abd8b8cd2025d6d097f5a415868ccbd68">durata</a>) &amp;&amp; (orario + durata &gt; ora-&gt;<a class="code" href="structora__t.html#aa0a139446f6b1e6d08ad37d2f7de8125">orario</a>) )</div>
<div class="line">                        <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"></div>
<div class="line">                tmp = g_list_next(tmp);</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aa1ebd22d0b9b412732437f261124f538"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int controlla_formato_ora </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>data</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Converte una stringa rappresentante un orario in intero. </p>
<p>In base al formato della stringa restituisce l'intero in minuti </p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>Stringa </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Restituisce</dt><dd>minuti rappresentanti l'ora </dd></dl>
<div class="fragment"><div class="line">{       </div>
<div class="line">        <span class="keywordtype">int</span> len = 0;</div>
<div class="line">        <span class="keywordflow">for</span> (; data[len] != <span class="charliteral">&#39;\0&#39;</span>; len++)</div>
<div class="line">                ;</div>
<div class="line"></div>
<div class="line">        <a class="code" href="debug_8h.html#a43e8ca05b2c0abb00d31e535b4186b7e" title="Mostra stato variabili ed errori veri e propri.">D2</a>(cout&lt;&lt;<span class="stringliteral">&quot;len: &quot;</span>&lt;&lt;len&lt;&lt;endl)</div>
<div class="line">        </div>
<div class="line">        <span class="comment">//controllo che caratteri siano numerici </span></div>
<div class="line">        switch (len){</div>
<div class="line">                <span class="keywordflow">case</span> 5:</div>
<div class="line">                        <span class="keywordflow">if</span> (data[4] &lt; <span class="charliteral">&#39;0&#39;</span> || data[4] &gt; <span class="charliteral">&#39;9&#39;</span>)</div>
<div class="line">                                <span class="keywordflow">return</span> -1;</div>
<div class="line">                <span class="keywordflow">case</span> 4:</div>
<div class="line">                        <span class="keywordflow">if</span> (data[3] &lt; <span class="charliteral">&#39;0&#39;</span> || data[3] &gt; <span class="charliteral">&#39;9&#39;</span>)</div>
<div class="line">                                <span class="keywordflow">return</span> -1;</div>
<div class="line">                <span class="keywordflow">case</span> 2:</div>
<div class="line">                        <span class="keywordflow">if</span> (data[1] &lt; <span class="charliteral">&#39;0&#39;</span> || data[1] &gt; <span class="charliteral">&#39;9&#39;</span>)</div>
<div class="line">                                <span class="keywordflow">return</span> -1;</div>
<div class="line">                <span class="keywordflow">case</span> 1: </div>
<div class="line">                        <span class="keywordflow">if</span> (data[0] &lt; <span class="charliteral">&#39;0&#39;</span> || data[0] &gt; <span class="charliteral">&#39;9&#39;</span>)</div>
<div class="line">                                <span class="keywordflow">return</span> -1;</div>
<div class="line">                        <span class="keywordflow">break</span>;</div>
<div class="line">                <span class="keywordflow">default</span>:</div>
<div class="line">                        <span class="keywordflow">return</span> -1;</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        <a class="code" href="debug_8h.html#afff1e38d74b3116b7a77d0272adf2dbf" title="Mostra i vari passaggi fondamentali.">D1</a>(cout&lt;&lt;<span class="stringliteral">&quot;Tutti caratteri numerici&quot;</span>&lt;&lt;endl) </div>
<div class="line"></div>
<div class="line">        <span class="comment">//formato h</span></div>
<div class="line">        if (len == 1)</div>
<div class="line">                return (data[0] - &#39;0&#39;)*60;</div>
<div class="line"></div>
<div class="line">        <span class="comment">//formato hh controllo che non sia maggiore di 23</span></div>
<div class="line">        if (len == 2)</div>
<div class="line">                switch (data[0]-&#39;0&#39;){</div>
<div class="line">                        <span class="keywordflow">case</span> 0:</div>
<div class="line">                        <span class="keywordflow">case</span> 1:</div>
<div class="line">                                <span class="keywordflow">return</span> ((data[0]-<span class="charliteral">&#39;0&#39;</span>)*10 + (data[1]-<span class="charliteral">&#39;0&#39;</span>))*60;</div>
<div class="line">                                <span class="keywordflow">break</span>;</div>
<div class="line">                        <span class="keywordflow">case</span> 2:</div>
<div class="line">                                <span class="keywordflow">if</span> ((data[1]-<span class="charliteral">&#39;0&#39;</span>) &lt; 3)</div>
<div class="line">                                        <span class="keywordflow">return</span> ((data[0]-<span class="charliteral">&#39;0&#39;</span>)*10 + (data[1]-<span class="charliteral">&#39;0&#39;</span>))*60;</div>
<div class="line">                        <span class="keywordflow">default</span>:</div>
<div class="line">                                <span class="keywordflow">return</span> -1;</div>
<div class="line">                }</div>
<div class="line"></div>
<div class="line">        <span class="comment">//formato h:mm</span></div>
<div class="line">        <span class="keywordflow">if</span> (len == 4){</div>
<div class="line">                <span class="keywordflow">if</span> (data[2] &gt; <span class="charliteral">&#39;5&#39;</span> )</div>
<div class="line">                        <span class="keywordflow">return</span> -1;</div>
<div class="line"></div>
<div class="line">                <span class="keywordflow">return</span> (data[0]-<span class="charliteral">&#39;0&#39;</span>)*60 + (data[2]-<span class="charliteral">&#39;0&#39;</span>)*10 + (data[3]-<span class="charliteral">&#39;0&#39;</span>);</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        <span class="comment">//formato hh:mm</span></div>
<div class="line">        <span class="keywordflow">if</span> (len == 5){</div>
<div class="line">                <span class="keywordflow">if</span> (data[3] &gt; <span class="charliteral">&#39;5&#39;</span>)</div>
<div class="line">                        <span class="keywordflow">return</span> -1;</div>
<div class="line"></div>
<div class="line">                <span class="keywordflow">switch</span> (data[0]-<span class="charliteral">&#39;0&#39;</span>){</div>
<div class="line">                        <span class="keywordflow">case</span> 0:</div>
<div class="line">                        <span class="keywordflow">case</span> 1:</div>
<div class="line">                                <span class="keywordflow">return</span> ((data[0]-<span class="charliteral">&#39;0&#39;</span>)*10 + (data[1]-<span class="charliteral">&#39;0&#39;</span>))*60 + (data[3]-<span class="charliteral">&#39;0&#39;</span>)*10 + (data[4]-<span class="charliteral">&#39;0&#39;</span>);</div>
<div class="line">                                <span class="keywordflow">break</span>;</div>
<div class="line">                        <span class="keywordflow">case</span> 2:</div>
<div class="line">                                <span class="keywordflow">if</span> ((data[1]-<span class="charliteral">&#39;0&#39;</span>) &lt; 3)</div>
<div class="line">                                        <span class="keywordflow">return</span> ((data[0]-<span class="charliteral">&#39;0&#39;</span>)*10 + (data[1]-<span class="charliteral">&#39;0&#39;</span>))*60 + (data[3]-<span class="charliteral">&#39;0&#39;</span>)*10 + (data[4]-<span class="charliteral">&#39;0&#39;</span>);</div>
<div class="line">                        <span class="keywordflow">default</span>:</div>
<div class="line">                                <span class="keywordflow">return</span> -1;</div>
<div class="line">                }</div>
<div class="line">        }</div>
<div class="line">        </div>
<div class="line">        <span class="keywordflow">return</span> -1;              </div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a5cd77391ccb43a307314fc973742ed31"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void controllo_estensione </td>
          <td>(</td>
          <td class="paramtype">char *&amp;&#160;</td>
          <td class="paramname"><em>file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>estensione</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Controlla l'estensione del file. </p>
<p>Se il nome del file non ha estensione l'aggiunge </p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">file</td><td>File da controllare </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line">{</div>
<div class="line">        <span class="keywordflow">if</span> ( g_str_has_suffix(file, estensione) )</div>
<div class="line">                <span class="keywordflow">return</span>;</div>
<div class="line"></div>
<div class="line">        <span class="keywordtype">char</span> *tmp = g_strconcat(file, estensione, NULL);</div>
<div class="line">        g_free(file);</div>
<div class="line">        file = tmp;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a952e1263d42c2a3e4df7cb4189d52379"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void disegna_tabella_ore </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Disegna la base della tabella ore. </p>
<p>Disegna gli orari e le righe per i campi </p>
<div class="fragment"><div class="line">{</div>
<div class="line">        GtkContainer *finestra = GTK_CONTAINER( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;tabella_ore&quot;</span>) );</div>
<div class="line">        GList *figli = gtk_container_get_children(finestra);</div>
<div class="line">        GtkWidget *vecchio = GTK_WIDGET(figli-&gt;data);</div>
<div class="line"></div>
<div class="line">        gtk_widget_destroy(vecchio);</div>
<div class="line">                </div>
<div class="line">        GtkGrid *tabella = GTK_GRID( gtk_grid_new() );</div>
<div class="line"></div>
<div class="line">        gtk_container_add(finestra, GTK_WIDGET(tabella) );</div>
<div class="line"></div>
<div class="line">        gtk_grid_set_column_spacing(tabella, 1);</div>
<div class="line"></div>
<div class="line">        <span class="comment">//colonna campi</span></div>
<div class="line">        gtk_grid_insert_column(tabella, 0);</div>
<div class="line"></div>
<div class="line">        <span class="comment">//creazione colonne di tutta la giornata</span></div>
<div class="line">        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; ( (<a class="code" href="handler_8cc.html#af45dc783e55c4fd9bcebf41135fe5da9">ORA_CHIUSURA</a>-<a class="code" href="handler_8cc.html#afd4f3203e7d93c11312acfb3bd818b4d">ORA_APERTURA</a>-1)*60 ); i++)</div>
<div class="line">                gtk_grid_insert_column(tabella, 0);</div>
<div class="line"></div>
<div class="line">        <span class="comment">//riga per gli orari</span></div>
<div class="line">        gtk_grid_insert_row(tabella, 0);</div>
<div class="line">        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = <a class="code" href="handler_8cc.html#afd4f3203e7d93c11312acfb3bd818b4d">ORA_APERTURA</a>; i &lt;= <a class="code" href="handler_8cc.html#af45dc783e55c4fd9bcebf41135fe5da9">ORA_CHIUSURA</a>-1; i++){</div>
<div class="line">                <span class="keywordtype">char</span> *tmp = g_strdup_printf(<span class="stringliteral">&quot;%02d:00&quot;</span>, i);</div>
<div class="line">                GtkWidget *etichetta = GTK_WIDGET( gtk_label_new(tmp) );</div>
<div class="line">                gtk_grid_attach(tabella, etichetta, ( (i - <a class="code" href="handler_8cc.html#afd4f3203e7d93c11312acfb3bd818b4d">ORA_APERTURA</a> + 1) * 60 ), 0, 60, 1);</div>
<div class="line">                g_free(tmp);</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        <span class="comment">//righe dei campi</span></div>
<div class="line">        g_list_foreach(<a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>-&gt;<a class="code" href="structcircolo__t.html#ac09c9e7d077f71951c457652a874565f">campi</a>, <a class="code" href="handler_8cc.html#a3dfb1abf80d66926a17e6065559ea726" title="Aggiunge alla tabella le righe dei campi.">inserisci_righe_campi</a> , tabella);</div>
<div class="line"></div>
<div class="line">        <a class="code" href="handler_8cc.html#ab161e7dfc521058bc5bd03f723a106a8" title="Aggiorna la tabella delle ore.">aggiorna_tabella_ore</a>(NULL, NULL);</div>
<div class="line">        gtk_widget_show_all( GTK_WIDGET(finestra) );</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ac8a9536dc4693a966d4e0023e4d745c6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void distruggi_cella_se_interna </td>
          <td>(</td>
          <td class="paramtype">GtkWidget *&#160;</td>
          <td class="paramname"><em>widget</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>container</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Distrugge la cella del container se non fa parte della struttara esterna. </p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">widget</td><td>Cella da eliminare </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">container</td><td>Contenitore della cella </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line">{</div>
<div class="line">        <span class="keywordtype">int</span> top, left;</div>
<div class="line">        gtk_container_child_get( GTK_CONTAINER(container), widget,</div>
<div class="line">                                                <span class="stringliteral">&quot;top-attach&quot;</span>, &amp;top,</div>
<div class="line">                                                <span class="stringliteral">&quot;left-attach&quot;</span>, &amp;left,</div>
<div class="line">                                                NULL);</div>
<div class="line">        </div>
<div class="line">        <span class="keywordflow">if</span> (top == 0 || left == 0)</div>
<div class="line">                <span class="keywordflow">return</span>;</div>
<div class="line"></div>
<div class="line">        gtk_widget_destroy(widget);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a8713b519a311ec08fc899e7fa176f963"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void finestra_errore </td>
          <td>(</td>
          <td class="paramtype">const char&#160;</td>
          <td class="paramname"><em>messaggio</em>[]</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Mostra una finestra di errore. </p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">messaggio</td><td>Messaggio da mostrare </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line">{</div>
<div class="line">        GtkWidget *window = GTK_WIDGET( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;errore&quot;</span>) );</div>
<div class="line">        GtkLabel *errore = GTK_LABEL( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;errore_m&quot;</span>) );</div>
<div class="line">        gtk_label_set_text(errore, messaggio);</div>
<div class="line">        gtk_widget_show_all(window);    </div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a516736f14e3e848624813322492e3561"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static char* get_current_name </td>
          <td>(</td>
          <td class="paramtype">GtkFileChooser *&#160;</td>
          <td class="paramname"><em>chooser</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Ritorna il nome del file del FileChooser. </p>
<p>Sostitutivo della gtk_file_chooser_get_current_name che è presente solo dalla versione 3.10 non presente in tutte le distribuzioni </p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">chooser</td><td>FileChooser </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Restituisce</dt><dd>Nome del file </dd></dl>
<div class="fragment"><div class="line">{</div>
<div class="line">        <span class="keywordtype">char</span> *file = gtk_file_chooser_get_filename(chooser);</div>
<div class="line">        <span class="keywordtype">char</span> *name = 0;</div>
<div class="line">        <span class="keywordtype">int</span> barra = 0;</div>
<div class="line">        <span class="keywordtype">int</span> i;</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">for</span> (i = 0; file[i] != <span class="charliteral">&#39;\0&#39;</span>; i++)</div>
<div class="line">                <span class="keywordflow">if</span> (file[i] == <span class="charliteral">&#39;/&#39;</span>)</div>
<div class="line">                        barra = i;</div>
<div class="line"></div>
<div class="line">        name = <span class="keyword">new</span> <span class="keywordtype">char</span>[i-barra];</div>
<div class="line">        g_strlcpy(name, &amp;file[barra+1], (i-barra) );</div>
<div class="line"></div>
<div class="line">        g_free(file);</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">return</span> name;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a3b9e5487e0942b6b558d5b19a39fbc2d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static char* get_stringa_data </td>
          <td>(</td>
          <td class="paramtype">GtkCalendar *&#160;</td>
          <td class="paramname"><em>calendario</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Restituisce una stringa con la data. </p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">calendario</td><td>Calendario </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Restituisce</dt><dd>Data </dd></dl>
<div class="fragment"><div class="line">{</div>
<div class="line">        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> giorno, mese, anno;</div>
<div class="line"></div>
<div class="line">        gtk_calendar_get_date(calendario, &amp;anno, &amp;mese, &amp;giorno);</div>
<div class="line">        mese++;</div>
<div class="line">        <span class="keywordtype">char</span> *data = g_strdup_printf(<span class="stringliteral">&quot;%02d-%02d-%04d&quot;</span>, giorno, mese, anno);</div>
<div class="line">        </div>
<div class="line">        <span class="keywordflow">return</span> data;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a98d459bf3ec2ccdc08f817e8e0968eda"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void handler_aggiungi_campo </td>
          <td>(</td>
          <td class="paramtype">GtkButton *&#160;</td>
          <td class="paramname"><em>button</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Aggiunge/Modifica con i campi inseriri il campo. </p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">user_data</td><td>Eventuale vecchio campo </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line">{</div>
<div class="line">        <span class="keywordflow">if</span> (<a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a> == 0){</div>
<div class="line">                <a class="code" href="handler_8cc.html#a8713b519a311ec08fc899e7fa176f963" title="Mostra una finestra di errore.">finestra_errore</a>(<span class="stringliteral">&quot;Circolo non inizializzato&quot;</span>);</div>
<div class="line">                <span class="keywordflow">return</span>;</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        GObject *campo_ = gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;campo_ok&quot;</span>);</div>
<div class="line">        <a class="code" href="structcampo__t.html" title="Struttura rappresentate i campi.">campo_t</a> *vecchio_c = (<a class="code" href="structcampo__t.html" title="Struttura rappresentate i campi.">campo_t</a> *) g_object_get_data(campo_, <span class="stringliteral">&quot;campo&quot;</span>);</div>
<div class="line"></div>
<div class="line">        <a class="code" href="structcampo__t.html" title="Struttura rappresentate i campi.">campo_t</a> *campo = 0;</div>
<div class="line"></div>
<div class="line">        GtkSpinButton *entry_numero = GTK_SPIN_BUTTON( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;numero_c&quot;</span>) );</div>
<div class="line">        GtkComboBox *entry_copertura = GTK_COMBO_BOX( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;copertura_c&quot;</span>) );</div>
<div class="line">        GtkComboBox *entry_terreno = GTK_COMBO_BOX( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;terreno_c&quot;</span>) );</div>
<div class="line">        GtkEntry *entry_note = GTK_ENTRY( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;note_c&quot;</span>) );</div>
<div class="line"></div>
<div class="line">        <span class="keywordtype">int</span> numero = gtk_spin_button_get_value_as_int(entry_numero);</div>
<div class="line">        <a class="code" href="struttura__dati_8h.html#ad0f5a2191c29d4cd4c52506513493755" title="Tipo che rappresenta il tipo di copertura del campo.">copertura_t</a> copertura = (<a class="code" href="struttura__dati_8h.html#ad0f5a2191c29d4cd4c52506513493755" title="Tipo che rappresenta il tipo di copertura del campo.">copertura_t</a>) gtk_combo_box_get_active(entry_copertura);</div>
<div class="line">        <a class="code" href="struttura__dati_8h.html#a0c12af1750520ca1d5e0a1b120ed33b7" title="Tipo che rappresenta il tipo di terreno.">terreno_t</a> terreno = (<a class="code" href="struttura__dati_8h.html#a0c12af1750520ca1d5e0a1b120ed33b7" title="Tipo che rappresenta il tipo di terreno.">terreno_t</a>) gtk_combo_box_get_active(entry_terreno);</div>
<div class="line">        <span class="keyword">const</span> <span class="keywordtype">char</span> *note = gtk_entry_get_text(entry_note);</div>
<div class="line"></div>
<div class="line">        GList *list = <a class="code" href="accesso__dati_8h.html#a8c471a7dcca8667fd9f4019c9fe2e40f" title="Cerca all&#39;interno della lista gli elementi corrispondeti ai dati passati, il confronto è tra interi...">cerca_lista_int</a>(<a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>-&gt;<a class="code" href="structcircolo__t.html#ac09c9e7d077f71951c457652a874565f">campi</a>, numero, numero, <a class="code" href="structcampo__t.html" title="Struttura rappresentate i campi.">campo_t</a>);</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> (list != NULL){</div>
<div class="line">                <a class="code" href="handler_8cc.html#a8713b519a311ec08fc899e7fa176f963" title="Mostra una finestra di errore.">finestra_errore</a>(<span class="stringliteral">&quot;numero campo già prsente&quot;</span>);</div>
<div class="line">                <span class="keywordflow">return</span>;</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        g_list_free(list);</div>
<div class="line"></div>
<div class="line">        campo = <a class="code" href="accesso__dati_8cc.html#a377ecb279ec8310e63e4b6c1196e703b" title="Aggiunge un campo al Circolo.">aggiungi_campo</a>(numero, copertura, terreno, note, vecchio_c, <a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>);</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> (campo == 0){</div>
<div class="line">                <a class="code" href="handler_8cc.html#a8713b519a311ec08fc899e7fa176f963" title="Mostra una finestra di errore.">finestra_errore</a>(<span class="stringliteral">&quot;Impossibile aggiungere il campo&quot;</span>);</div>
<div class="line">                <span class="keywordflow">return</span>;</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> ( !<a class="code" href="file__IO_8cc.html#a1946bbd82e8da6a23d39f144da47261c" title="Salva il campo su file Salva il campo su un file nella directory del circolo.">salva_campo</a>(campo, <a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>) )</div>
<div class="line">                <a class="code" href="handler_8cc.html#a8713b519a311ec08fc899e7fa176f963" title="Mostra una finestra di errore.">finestra_errore</a>(<span class="stringliteral">&quot;Attenzione! non è stato possibile salvare il campo su file\n alla chiusura del programma \</span></div>
<div class="line"><span class="stringliteral">                                il campo non sarà più recuperabile&quot;</span>);</div>
<div class="line"></div>
<div class="line">        <a class="code" href="handler_8cc.html#a3cea95cc33a7419edc4bc03872da2c2c" title="Nasconde la finestra.">nascondi_finestra</a>( gtk_widget_get_toplevel( GTK_WIDGET(button) ), NULL, NULL);</div>
<div class="line">        <a class="code" href="handler_8cc.html#a952e1263d42c2a3e4df7cb4189d52379" title="Disegna la base della tabella ore.">disegna_tabella_ore</a>();</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ac26586ea6efeec6681706d1a8775adc0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void handler_aggiungi_giocatore </td>
          <td>(</td>
          <td class="paramtype">GtkButton *&#160;</td>
          <td class="paramname"><em>button</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Aggiunge/Modifica con i campi inseriri il giocatore. </p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">user_data</td><td>Eventuale vecchio giocatore </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line">{</div>
<div class="line">        <span class="keywordflow">if</span> (<a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a> == 0){</div>
<div class="line">                <a class="code" href="handler_8cc.html#a8713b519a311ec08fc899e7fa176f963" title="Mostra una finestra di errore.">finestra_errore</a>(<span class="stringliteral">&quot;Circolo non inizializzato&quot;</span>);</div>
<div class="line">                <span class="keywordflow">return</span>;</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        GObject *giocatore_ = gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;giocatore_ok&quot;</span>);</div>
<div class="line">        <a class="code" href="structgiocatore__t.html" title="Struttura rappresentante i giocatori.">giocatore_t</a> *vecchio_g = (<a class="code" href="structgiocatore__t.html" title="Struttura rappresentante i giocatori.">giocatore_t</a> *) g_object_get_data(giocatore_, <span class="stringliteral">&quot;giocatore&quot;</span>);</div>
<div class="line"></div>
<div class="line">        <a class="code" href="structgiocatore__t.html" title="Struttura rappresentante i giocatori.">giocatore_t</a> *giocatore = 0;</div>
<div class="line"></div>
<div class="line">        GtkEntry *entry_nome = GTK_ENTRY( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;nome_g&quot;</span>) );</div>
<div class="line">        GtkEntry *entry_cognome = GTK_ENTRY( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;cognome_g&quot;</span>) );</div>
<div class="line">        GtkEntry *entry_nascita = GTK_ENTRY( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;nascita_g&quot;</span>) );</div>
<div class="line">        GtkEntry *entry_tessera = GTK_ENTRY( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;tessera_g&quot;</span>) );</div>
<div class="line">        GtkEntry *entry_telefono = GTK_ENTRY( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;telefono_g&quot;</span>) );</div>
<div class="line">        GtkEntry *entry_email = GTK_ENTRY( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;email_g&quot;</span>) );</div>
<div class="line">        GtkEntry *entry_classifica = GTK_ENTRY( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;classifica_g&quot;</span>) );</div>
<div class="line">        GtkEntry *entry_circolo = GTK_ENTRY( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;circolo_g&quot;</span>) );</div>
<div class="line">        GtkToggleButton *toggle_socio = GTK_TOGGLE_BUTTON( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;socio_g&quot;</span>) );</div>
<div class="line">        GtkToggleButton *toggle_retta = GTK_TOGGLE_BUTTON( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;retta_g&quot;</span>) );</div>
<div class="line"></div>
<div class="line">        <span class="keyword">const</span> <span class="keywordtype">char</span> *nome = gtk_entry_get_text(entry_nome);</div>
<div class="line">        <span class="keyword">const</span> <span class="keywordtype">char</span> *cognome = gtk_entry_get_text(entry_cognome);</div>
<div class="line">        <span class="keyword">const</span> <span class="keywordtype">char</span> *nascita = gtk_entry_get_text(entry_nascita);</div>
<div class="line">        <span class="keyword">const</span> <span class="keywordtype">char</span> *tessera = gtk_entry_get_text(entry_tessera);</div>
<div class="line">        <span class="keyword">const</span> <span class="keywordtype">char</span> *telefono = gtk_entry_get_text(entry_telefono);</div>
<div class="line">        <span class="keyword">const</span> <span class="keywordtype">char</span> *email = gtk_entry_get_text(entry_email);</div>
<div class="line">        <span class="keyword">const</span> <span class="keywordtype">char</span> *classifica = gtk_entry_get_text(entry_classifica);</div>
<div class="line">        <span class="keyword">const</span> <span class="keywordtype">char</span> *circolo_g = gtk_entry_get_text(entry_circolo);</div>
<div class="line">        <span class="keywordtype">bool</span> socio = gtk_toggle_button_get_active(toggle_socio);</div>
<div class="line">        <span class="keywordtype">bool</span> retta = gtk_toggle_button_get_active(toggle_retta);</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> (nome[0] == <span class="charliteral">&#39;\0&#39;</span> || cognome[0] == <span class="charliteral">&#39;\0&#39;</span>){</div>
<div class="line">                <a class="code" href="handler_8cc.html#a8713b519a311ec08fc899e7fa176f963" title="Mostra una finestra di errore.">finestra_errore</a>(<span class="stringliteral">&quot;Inserisci nome e cognome&quot;</span>);</div>
<div class="line">                <span class="keywordflow">return</span>;</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> (socio)</div>
<div class="line">                giocatore = <a class="code" href="accesso__dati_8cc.html#a82dfa124abc5caaf2cff650dc1350f41" title="Aggiunge o modifica un socio al Circolo.">aggiungi_socio</a>(nome, cognome, nascita, tessera, telefono, email, classifica, retta, vecchio_g, <a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>);</div>
<div class="line">        <span class="keywordflow">else</span></div>
<div class="line">                giocatore = <a class="code" href="accesso__dati_8cc.html#a866ed70e148eecf0441dfb6ac0a5ebe2" title="Aggiunge o modifica un giocatore al Circolo.">aggiungi_giocatore</a>(nome, cognome, nascita, tessera, telefono, email, classifica, circolo_g, vecchio_g,</div>
<div class="line">                                                <a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>);</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> (giocatore == 0){</div>
<div class="line">                <a class="code" href="handler_8cc.html#a8713b519a311ec08fc899e7fa176f963" title="Mostra una finestra di errore.">finestra_errore</a>(<span class="stringliteral">&quot;Impossibile aggiungere il giocatore&quot;</span>);</div>
<div class="line">                <span class="keywordflow">return</span>;</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> ( !<a class="code" href="file__IO_8cc.html#aef6d85bdb65df00e55be504b21ea5a12" title="Salva il giocatore su file.">salva_giocatore</a>(giocatore, <a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>) )</div>
<div class="line">                <a class="code" href="handler_8cc.html#a8713b519a311ec08fc899e7fa176f963" title="Mostra una finestra di errore.">finestra_errore</a>(<span class="stringliteral">&quot;Attenzione! non è stato possibile salvare il giocatore su file\n alla chiusura del programma \</span></div>
<div class="line"><span class="stringliteral">                                il giocatore non sarà più recuperabile&quot;</span>);</div>
<div class="line"></div>
<div class="line">        <a class="code" href="handler_8cc.html#a3cea95cc33a7419edc4bc03872da2c2c" title="Nasconde la finestra.">nascondi_finestra</a>( gtk_widget_get_toplevel( GTK_WIDGET(button) ), NULL, NULL);  </div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ac17b4a4911f229ea2ba71dfac6ed1688"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void handler_annulla </td>
          <td>(</td>
          <td class="paramtype">GtkButton *&#160;</td>
          <td class="paramname"><em>button</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Chiude la finestra. </p>
<div class="fragment"><div class="line">{</div>
<div class="line">        GtkWidget *window = gtk_widget_get_toplevel( GTK_WIDGET(button) );</div>
<div class="line">        gtk_widget_hide(window);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aded29031447ee02a9663617b8f55f5b0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void handler_apri_circolo </td>
          <td>(</td>
          <td class="paramtype">GtkMenuItem *&#160;</td>
          <td class="paramname"><em>button</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Crea l'elenco dei circoli caricabili e lo mostra. </p>
<div class="fragment"><div class="line">{</div>
<div class="line">        GtkWidget *window = GTK_WIDGET( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;carica_circolo&quot;</span>) );</div>
<div class="line">        GtkListStore *list = GTK_LIST_STORE( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;circoli&quot;</span>) );</div>
<div class="line">        GDir *dir = g_dir_open(DATA_PATH, 0, NULL);</div>
<div class="line">        <span class="keyword">const</span> <span class="keywordtype">char</span> *file = 0;</div>
<div class="line">        <span class="keywordtype">char</span> *file_path = 0;</div>
<div class="line">        GtkTreeIter iter;</div>
<div class="line"></div>
<div class="line">        gtk_list_store_clear(list);</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">while</span>( (file = g_dir_read_name(dir)) ){</div>
<div class="line">                <span class="keywordflow">if</span> ( <a class="code" href="file__IO_8cc.html#a5be4d4dad972d003a60acda0a2e90339" title="Controlla se un file è nascosto.">file_nascosto</a>(file) )</div>
<div class="line">                        <span class="keywordflow">continue</span>;</div>
<div class="line"></div>
<div class="line">                file_path = g_build_filename(DATA_PATH, file, NULL);</div>
<div class="line"></div>
<div class="line">                <span class="keywordflow">if</span> ( !g_file_test(file_path, G_FILE_TEST_IS_DIR) ){</div>
<div class="line">                        g_free(file_path);</div>
<div class="line">                        <span class="keywordflow">continue</span>;</div>
<div class="line">                }</div>
<div class="line">        </div>
<div class="line">                g_free(file_path);</div>
<div class="line"></div>
<div class="line">                gtk_list_store_append(list, &amp;iter);</div>
<div class="line">                gtk_list_store_set(list, &amp;iter, 0, file, -1);</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        g_dir_close(dir);</div>
<div class="line"></div>
<div class="line">        gtk_widget_set_sensitive( GTK_WIDGET( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;menu_modifica&quot;</span>) ), TRUE);</div>
<div class="line">        gtk_widget_set_sensitive( GTK_WIDGET( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;menu_backup&quot;</span>) ), TRUE);</div>
<div class="line">        gtk_widget_set_sensitive( GTK_WIDGET( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;menu_visualizza&quot;</span>) ), TRUE);</div>
<div class="line"></div>
<div class="line">        <a class="code" href="handler_8cc.html#abef113ade0ebf32552faf22013fb51e6" title="Mostra a video la finestra.">mostra_finestra</a>(NULL, window);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ae4e35b5616a0c03b917a249c90559c6f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void handler_backup </td>
          <td>(</td>
          <td class="paramtype">GtkMenuItem *&#160;</td>
          <td class="paramname"><em>button</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Mostra la finestra per il salvataggio del backup. </p>
<div class="fragment"><div class="line">{</div>
<div class="line">        gint response;</div>
<div class="line">        <span class="keywordtype">bool</span> stato = <span class="keyword">true</span>;</div>
<div class="line">        <span class="keywordtype">char</span> *file = 0;</div>
<div class="line">        GtkFileChooser *scegli_file = GTK_FILE_CHOOSER( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;scegli_file&quot;</span>) );</div>
<div class="line">        </div>
<div class="line">        gtk_file_chooser_set_action(scegli_file, GTK_FILE_CHOOSER_ACTION_SAVE);</div>
<div class="line">        gtk_file_chooser_set_do_overwrite_confirmation(scegli_file, TRUE);</div>
<div class="line"></div>
<div class="line">        <a class="code" href="handler_8cc.html#abef113ade0ebf32552faf22013fb51e6" title="Mostra a video la finestra.">mostra_finestra</a>(NULL, scegli_file);</div>
<div class="line">        </div>
<div class="line">        response = gtk_dialog_run( GTK_DIALOG(scegli_file) );</div>
<div class="line">        <span class="keywordflow">if</span> (response == GTK_RESPONSE_YES){</div>
<div class="line">                file = gtk_file_chooser_get_filename(scegli_file);</div>
<div class="line">                <a class="code" href="debug_8h.html#afff1e38d74b3116b7a77d0272adf2dbf" title="Mostra i vari passaggi fondamentali.">D1</a>(cout&lt;&lt;<span class="stringliteral">&quot;nome: &quot;</span>&lt;&lt;file&lt;&lt;endl);</div>
<div class="line">                stato = <a class="code" href="file__IO_8cc.html#a6b5cce7059635c9b27474d6b4d54d4f6" title="Crea un backup del circolo.">backup</a>(file, <a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>);</div>
<div class="line">                g_free(file);</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> (stato == <span class="keyword">false</span>)</div>
<div class="line">                <a class="code" href="handler_8cc.html#a8713b519a311ec08fc899e7fa176f963" title="Mostra una finestra di errore.">finestra_errore</a>(<span class="stringliteral">&quot;Non è stato possibile effetturare il backup&quot;</span>);</div>
<div class="line">        </div>
<div class="line">        <a class="code" href="handler_8cc.html#a3cea95cc33a7419edc4bc03872da2c2c" title="Nasconde la finestra.">nascondi_finestra</a>( GTK_WIDGET(scegli_file), NULL, NULL);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ad40d4d29e5f9fb374a70fbe0782de844"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void handler_carica_circolo </td>
          <td>(</td>
          <td class="paramtype">GtkButton *&#160;</td>
          <td class="paramname"><em>button</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Carica il circolo selezionato. </p>
<div class="fragment"><div class="line">{</div>
<div class="line">        <span class="keywordflow">if</span> ( <a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a> != 0 &amp;&amp; user_data == 0 &amp;&amp; !<a class="code" href="handler_8cc.html#a242b4c7315a053af14f55798531abfeb" title="Mostra una finestra di dialogo con i pulsanti SI e NO.">alert</a>(<span class="stringliteral">&quot;Verrà chiuso il circolo attuale. Continuare?&quot;</span>) )</div>
<div class="line">                <span class="keywordflow">return</span>;</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> ( <a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a> != 0 )</div>
<div class="line">                <a class="code" href="accesso__dati_8cc.html#a6ab541cc7d58b854e085a8fcef76e581" title="Elimina il circolo dalla memoria.">elimina_circolo</a>(<a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>);</div>
<div class="line">        </div>
<div class="line">        <span class="keywordtype">char</span> *circolo_sel = 0;  </div>
<div class="line">        GtkWidget *window = GTK_WIDGET( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;carica_circolo&quot;</span>) );</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> ( user_data != 0 )</div>
<div class="line">                circolo_sel = (<span class="keywordtype">char</span> *) user_data;</div>
<div class="line">        <span class="keywordflow">else</span> {  </div>
<div class="line"></div>
<div class="line">                GtkTreeIter iter;</div>
<div class="line">                GtkTreeModel *model;</div>
<div class="line">                GtkTreeView *view = GTK_TREE_VIEW( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;circolo_view&quot;</span>) );</div>
<div class="line">                GtkTreeSelection *selezione = gtk_tree_view_get_selection(view);</div>
<div class="line">        </div>
<div class="line">                <span class="keywordflow">if</span> ( !gtk_tree_selection_get_selected(selezione, &amp;model, &amp;iter) ){</div>
<div class="line">                        <a class="code" href="handler_8cc.html#a8713b519a311ec08fc899e7fa176f963" title="Mostra una finestra di errore.">finestra_errore</a>(<span class="stringliteral">&quot;Selezionare un elemento&quot;</span>);</div>
<div class="line">                        <span class="keywordflow">return</span>;</div>
<div class="line">                }</div>
<div class="line">                gtk_tree_model_get(model, &amp;iter, 0, &amp;circolo_sel, -1);</div>
<div class="line">        </div>
<div class="line">        }</div>
<div class="line">        </div>
<div class="line">        <a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a> = <a class="code" href="file__IO_8cc.html#ae58c887a1fc340538de88e9c46ff3100" title="Carica da file i dati del circolo Carica dalla directory del programma i dati del circolo...">carica_circolo</a>(circolo_sel);</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> (user_data == 0)</div>
<div class="line">                g_free(circolo_sel);</div>
<div class="line"></div>
<div class="line">        <a class="code" href="handler_8cc.html#a3cea95cc33a7419edc4bc03872da2c2c" title="Nasconde la finestra.">nascondi_finestra</a>(window, NULL, NULL);</div>
<div class="line">        <a class="code" href="handler_8cc.html#a952e1263d42c2a3e4df7cb4189d52379" title="Disegna la base della tabella ore.">disegna_tabella_ore</a>();  </div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a5b268caeacbd48bffabc35d7db9726e8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void handler_elenco_campi </td>
          <td>(</td>
          <td class="paramtype">GtkMenuItem *&#160;</td>
          <td class="paramname"><em>button</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Visualizza l'elenco dei campi. </p>
<div class="fragment"><div class="line">{</div>
<div class="line">        GtkWidget *window = GTK_WIDGET( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;elenco_c&quot;</span>) );</div>
<div class="line">        GtkListStore *list = GTK_LIST_STORE( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;campi&quot;</span>) );</div>
<div class="line">        </div>
<div class="line">        gtk_list_store_clear(list);</div>
<div class="line"></div>
<div class="line">        g_list_foreach(<a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>-&gt;<a class="code" href="structcircolo__t.html#ac09c9e7d077f71951c457652a874565f">campi</a>, <a class="code" href="handler_8cc.html#a332b65c4735ded9b047d074bb8f2639b" title="Inserisce il campo nella ListStore.">insert_list_campi</a>, list);</div>
<div class="line"></div>
<div class="line">        gtk_widget_show_all(window);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ae54e9229d008986ba7fa4c4684e2e8cc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void handler_elenco_giocatori </td>
          <td>(</td>
          <td class="paramtype">GtkMenuItem *&#160;</td>
          <td class="paramname"><em>button</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Visualizza l'elenco dei giocatori. </p>
<div class="fragment"><div class="line">{</div>
<div class="line">        GtkWidget *window = GTK_WIDGET( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;elenco_g&quot;</span>) );</div>
<div class="line">        GtkTreeView *view = GTK_TREE_VIEW( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;giocatori_view&quot;</span>) );</div>
<div class="line">        GtkListStore *list = GTK_LIST_STORE( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;giocatori&quot;</span>) );</div>
<div class="line"></div>
<div class="line">        gtk_tree_view_set_model(view, GTK_TREE_MODEL(list) );</div>
<div class="line">        </div>
<div class="line">        gtk_list_store_clear(list);</div>
<div class="line"></div>
<div class="line">        g_list_foreach(<a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>-&gt;<a class="code" href="structcircolo__t.html#aa17088e0fc000cfbc4c6b08c0c18cef2">giocatori</a>, <a class="code" href="handler_8cc.html#a8bf2479da80daf509d7af3dca324e92c" title="Inserisce il giocatore nella ListStore.">insert_list_giocatore</a>, list);</div>
<div class="line"></div>
<div class="line">        gtk_widget_show_all(window);</div>
<div class="line">        </div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a639967c965bffe9ce114421fc755c2c8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void handler_elenco_soci </td>
          <td>(</td>
          <td class="paramtype">GtkMenuItem *&#160;</td>
          <td class="paramname"><em>button</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Visualizza l'elenco dei soci. </p>
<div class="fragment"><div class="line">{</div>
<div class="line">        GtkWidget *window = GTK_WIDGET( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;elenco_g&quot;</span>) );</div>
<div class="line">        GtkTreeView *view = GTK_TREE_VIEW( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;giocatori_view&quot;</span>) );</div>
<div class="line">        GtkListStore *list = GTK_LIST_STORE( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;soci&quot;</span>) );</div>
<div class="line"></div>
<div class="line">        gtk_tree_view_set_model(view, GTK_TREE_MODEL(list) );</div>
<div class="line"></div>
<div class="line">        GList *soci = <a class="code" href="accesso__dati_8h.html#a8c471a7dcca8667fd9f4019c9fe2e40f" title="Cerca all&#39;interno della lista gli elementi corrispondeti ai dati passati, il confronto è tra interi...">cerca_lista_int</a>(<a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>-&gt;<a class="code" href="structcircolo__t.html#aa17088e0fc000cfbc4c6b08c0c18cef2">giocatori</a>, socio, <span class="keyword">true</span>, <a class="code" href="structgiocatore__t.html" title="Struttura rappresentante i giocatori.">giocatore_t</a>);</div>
<div class="line"></div>
<div class="line">        gtk_list_store_clear(list);</div>
<div class="line"></div>
<div class="line">        g_list_foreach(soci, <a class="code" href="handler_8cc.html#a8bf2479da80daf509d7af3dca324e92c" title="Inserisce il giocatore nella ListStore.">insert_list_giocatore</a>, list);</div>
<div class="line"></div>
<div class="line">        g_list_free(soci);</div>
<div class="line"></div>
<div class="line">        gtk_widget_show_all(window);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a37d8fb1647e44c328835c9b48ea379d2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void handler_elimina_campo </td>
          <td>(</td>
          <td class="paramtype">GtkButton *&#160;</td>
          <td class="paramname"><em>button</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Elimina il campo selezionato. </p>
<div class="fragment"><div class="line">{</div>
<div class="line">        <span class="keywordflow">if</span> ( !<a class="code" href="handler_8cc.html#a242b4c7315a053af14f55798531abfeb" title="Mostra una finestra di dialogo con i pulsanti SI e NO.">alert</a>(<span class="stringliteral">&quot;Sei sicuro di voler eliminare il campo?&quot;</span>) )</div>
<div class="line">                <span class="keywordflow">return</span>;</div>
<div class="line">        </div>
<div class="line">        GtkTreeIter iter;</div>
<div class="line">        GtkTreeModel *model;</div>
<div class="line">        <a class="code" href="structcampo__t.html" title="Struttura rappresentate i campi.">campo_t</a> *campo = 0;</div>
<div class="line">        GtkTreeView *view = GTK_TREE_VIEW( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;campi_view&quot;</span>) );</div>
<div class="line">        GtkTreeSelection *selezione = gtk_tree_view_get_selection(view);</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> ( !gtk_tree_selection_get_selected(selezione, &amp;model, &amp;iter) ){</div>
<div class="line">                <a class="code" href="handler_8cc.html#a8713b519a311ec08fc899e7fa176f963" title="Mostra una finestra di errore.">finestra_errore</a>(<span class="stringliteral">&quot;Selezionare un elemento&quot;</span>);</div>
<div class="line">                <span class="keywordflow">return</span>;</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        gtk_tree_model_get(model, &amp;iter, 3, &amp;campo, -1);</div>
<div class="line"></div>
<div class="line">        <a class="code" href="file__IO_8cc.html#ae0db214f2e6d02992b5a15f693352ed8" title="Elimina il file del campo.">elimina_file_campo</a>(campo, <a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>);</div>
<div class="line">        <a class="code" href="accesso__dati_8cc.html#a34b3c4cdedff1bc3af44d063f8df0bb7" title="Elimina il campo dal Circolo.">elimina_campo</a>(campo, <a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>);</div>
<div class="line"></div>
<div class="line">        <a class="code" href="handler_8cc.html#a5b268caeacbd48bffabc35d7db9726e8" title="Visualizza l&#39;elenco dei campi.">handler_elenco_campi</a>(NULL, NULL);</div>
<div class="line">        <a class="code" href="handler_8cc.html#a952e1263d42c2a3e4df7cb4189d52379" title="Disegna la base della tabella ore.">disegna_tabella_ore</a>();</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ae2b24768fc6d42406937fb283c9992ae"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void handler_elimina_circolo </td>
          <td>(</td>
          <td class="paramtype">GtkButton *&#160;</td>
          <td class="paramname"><em>button</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Elimina il circolo selezionato. </p>
<div class="fragment"><div class="line">{</div>
<div class="line">        <span class="keywordtype">char</span> *circolo_sel = 0;</div>
<div class="line">        <span class="keywordtype">char</span> *dir_cir = 0;</div>
<div class="line">        </div>
<div class="line">        GtkTreeIter iter;</div>
<div class="line">        GtkTreeModel *model;</div>
<div class="line">        GtkTreeView *view = GTK_TREE_VIEW( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;circolo_view&quot;</span>) );</div>
<div class="line">        GtkTreeSelection *selezione = gtk_tree_view_get_selection(view);</div>
<div class="line">        </div>
<div class="line">        <span class="keywordflow">if</span> ( !gtk_tree_selection_get_selected(selezione, &amp;model, &amp;iter) ){</div>
<div class="line">                <a class="code" href="handler_8cc.html#a8713b519a311ec08fc899e7fa176f963" title="Mostra una finestra di errore.">finestra_errore</a>(<span class="stringliteral">&quot;Selezionare un elemento&quot;</span>);</div>
<div class="line">                <span class="keywordflow">return</span>;</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        gtk_tree_model_get(model, &amp;iter, 0, &amp;circolo_sel, -1);</div>
<div class="line"></div>
<div class="line">        dir_cir = <a class="code" href="file__IO_8cc.html#aa82e7288bfea5165a7d63b66eaea48d5" title="Ritorna la directory del circolo.">get_dir_circolo</a>(circolo_sel);</div>
<div class="line"></div>
<div class="line">        <a class="code" href="debug_8h.html#a43e8ca05b2c0abb00d31e535b4186b7e" title="Mostra stato variabili ed errori veri e propri.">D2</a>(cout&lt;&lt;circolo_sel&lt;&lt;<span class="stringliteral">&quot; &quot;</span>&lt;&lt;<a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>-&gt;<a class="code" href="structcircolo__t.html#aa697bc3b2bef882ea48ca71972765d03">nome</a>-&gt;str&lt;&lt;endl)</div>
<div class="line"></div>
<div class="line">        if ( <a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a> != 0 &amp;&amp; g_strcmp0(circolo_sel, <a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>-&gt;nome-&gt;str) == 0 ){</div>
<div class="line">                <a class="code" href="handler_8cc.html#a8713b519a311ec08fc899e7fa176f963" title="Mostra una finestra di errore.">finestra_errore</a>(<span class="stringliteral">&quot;Il circolo è attualmente in uso. Impossibile eliminarlo&quot;</span>);</div>
<div class="line">                <span class="keywordflow">return</span>;</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> ( !<a class="code" href="handler_8cc.html#a242b4c7315a053af14f55798531abfeb" title="Mostra una finestra di dialogo con i pulsanti SI e NO.">alert</a>(<span class="stringliteral">&quot;Sei sicuro di voler eliminare il circolo?&quot;</span>) )</div>
<div class="line">                <span class="keywordflow">return</span>; </div>
<div class="line"></div>
<div class="line">        <a class="code" href="file__IO_8cc.html#a75d94cb4abf6c12c555117417dbd21c1" title="Elimina l&#39;intera struttura delle directory rapprensentanti il circolo.">elimina_file_circolo</a>(circolo_sel);</div>
<div class="line"></div>
<div class="line">        g_free(circolo_sel);</div>
<div class="line">        g_free(dir_cir);</div>
<div class="line"></div>
<div class="line">        <a class="code" href="handler_8cc.html#aded29031447ee02a9663617b8f55f5b0" title="Crea l&#39;elenco dei circoli caricabili e lo mostra.">handler_apri_circolo</a>(NULL, NULL);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a38852a03eed259563c4c9c3e5da5f72d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void handler_elimina_giocatore </td>
          <td>(</td>
          <td class="paramtype">GtkButton *&#160;</td>
          <td class="paramname"><em>button</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Elimina il giocatore selezionato. </p>
<div class="fragment"><div class="line">{</div>
<div class="line">        <span class="keywordflow">if</span> ( !<a class="code" href="handler_8cc.html#a242b4c7315a053af14f55798531abfeb" title="Mostra una finestra di dialogo con i pulsanti SI e NO.">alert</a>(<span class="stringliteral">&quot;Sei sicuro di voler eliminare il giocatore?&quot;</span>) )</div>
<div class="line">                <span class="keywordflow">return</span>;</div>
<div class="line"></div>
<div class="line">        GtkTreeIter iter;</div>
<div class="line">        GtkTreeModel *model;</div>
<div class="line">        <a class="code" href="structgiocatore__t.html" title="Struttura rappresentante i giocatori.">giocatore_t</a> *giocatore = 0;</div>
<div class="line">        GtkTreeView *view = GTK_TREE_VIEW( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;giocatori_view&quot;</span>) );</div>
<div class="line">        GtkTreeSelection *selezione = gtk_tree_view_get_selection(view);</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> ( !gtk_tree_selection_get_selected(selezione, &amp;model, &amp;iter) ){</div>
<div class="line">                <a class="code" href="handler_8cc.html#a8713b519a311ec08fc899e7fa176f963" title="Mostra una finestra di errore.">finestra_errore</a>(<span class="stringliteral">&quot;Selezionare un elemento&quot;</span>);</div>
<div class="line">                <span class="keywordflow">return</span>;</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        gtk_tree_model_get(model, &amp;iter, 7, &amp;giocatore, -1);</div>
<div class="line"></div>
<div class="line">        <a class="code" href="file__IO_8cc.html#a80f1a81cceb1888d0c0f1dba4a465ed1" title="Elimina il file del giocatore.">elimina_file_giocatore</a>(giocatore, <a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>);</div>
<div class="line">        <a class="code" href="accesso__dati_8cc.html#a5f9d73db750b97d0e7a47c2d0843f1f5" title="Elimina il giocatore dal Circolo Elimina i giocatore passato come parametro dal circolo.">elimina_giocatore</a>(giocatore, <a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>);</div>
<div class="line"></div>
<div class="line">        <a class="code" href="handler_8cc.html#ae54e9229d008986ba7fa4c4684e2e8cc" title="Visualizza l&#39;elenco dei giocatori.">handler_elenco_giocatori</a>(NULL, NULL);</div>
<div class="line">        <a class="code" href="handler_8cc.html#ab161e7dfc521058bc5bd03f723a106a8" title="Aggiorna la tabella delle ore.">aggiorna_tabella_ore</a>(NULL, NULL);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a8e8ff4a92a5e36caf50e67d3b8e8c479"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void handler_elimina_ora </td>
          <td>(</td>
          <td class="paramtype">GtkButton *&#160;</td>
          <td class="paramname"><em>button</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>cella_ora</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Elimina l'ora identificata dalla cella. </p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cella_ora</td><td>Cella dell'ora da eliminare </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line">{</div>
<div class="line">        <span class="keywordflow">if</span> ( !<a class="code" href="handler_8cc.html#a242b4c7315a053af14f55798531abfeb" title="Mostra una finestra di dialogo con i pulsanti SI e NO.">alert</a>(<span class="stringliteral">&quot;Sei sicuro di voler eliminare l&#39;ora?&quot;</span>) )</div>
<div class="line">                <span class="keywordflow">return</span>;</div>
<div class="line">        </div>
<div class="line">        GObject *box_v = gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;ora_esistente&quot;</span>);</div>
<div class="line"></div>
<div class="line">        <a class="code" href="structcampo__t.html" title="Struttura rappresentate i campi.">campo_t</a> *campo = (<a class="code" href="structcampo__t.html" title="Struttura rappresentate i campi.">campo_t</a> *) g_object_get_data(box_v, <span class="stringliteral">&quot;campo&quot;</span>);</div>
<div class="line">        <a class="code" href="structora__t.html" title="Struttura rappresentante le ore prenotate.">ora_t</a> *ora = (<a class="code" href="structora__t.html" title="Struttura rappresentante le ore prenotate.">ora_t</a> *) g_object_get_data(box_v, <span class="stringliteral">&quot;ora&quot;</span>);</div>
<div class="line"></div>
<div class="line">        <a class="code" href="debug_8h.html#afff1e38d74b3116b7a77d0272adf2dbf" title="Mostra i vari passaggi fondamentali.">D1</a>(cout&lt;&lt;campo&lt;&lt;endl);</div>
<div class="line">        <a class="code" href="debug_8h.html#a43e8ca05b2c0abb00d31e535b4186b7e" title="Mostra stato variabili ed errori veri e propri.">D2</a>(cout&lt;&lt;ora&lt;&lt;endl);</div>
<div class="line"></div>
<div class="line">        <a class="code" href="file__IO_8cc.html#aa4be40bc80a7ce416b6b3270455775d4" title="Elimina il file dell&#39;ora.">elimina_file_ora</a>(ora, campo, <a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>);</div>
<div class="line">        <a class="code" href="accesso__dati_8cc.html#aa69bec6817bd86b46f214ac511f85214" title="Elimina l&#39;ora dal campo.">elimina_ora</a>(ora, campo);</div>
<div class="line"></div>
<div class="line">        <a class="code" href="handler_8cc.html#ab161e7dfc521058bc5bd03f723a106a8" title="Aggiorna la tabella delle ore.">aggiorna_tabella_ore</a>(NULL, NULL);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a8286acf71d1039361e5401bcd560fa05"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gboolean handler_esci </td>
          <td>(</td>
          <td class="paramtype">GtkWidget *&#160;</td>
          <td class="paramname"><em>widget</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">GdkEvent *&#160;</td>
          <td class="paramname"><em>event</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Esce dal programma. </p>
<div class="fragment"><div class="line">{</div>
<div class="line">        gtk_main_quit();</div>
<div class="line">        <span class="keywordflow">return</span> TRUE;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a9548c9622a866b65c0edaa564709569e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void handler_file_ok </td>
          <td>(</td>
          <td class="paramtype">GtkWidget *&#160;</td>
          <td class="paramname"><em>widget</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">GdkEvent *&#160;</td>
          <td class="paramname"><em>event</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Controlla il nome del file selezionato per controllarne l'estensione. </p>
<div class="fragment"><div class="line">{</div>
<div class="line">        GtkFileChooser *chooser = GTK_FILE_CHOOSER(user_data);</div>
<div class="line">        <span class="keywordflow">if</span> ( gtk_file_chooser_get_action(chooser) == GTK_FILE_CHOOSER_ACTION_SAVE ){</div>
<div class="line">                <span class="keywordtype">char</span> *file = <a class="code" href="handler_8cc.html#a516736f14e3e848624813322492e3561" title="Ritorna il nome del file del FileChooser.">get_current_name</a>(chooser);</div>
<div class="line">                </div>
<div class="line">                <a class="code" href="handler_8cc.html#a5cd77391ccb43a307314fc973742ed31" title="Controlla l&#39;estensione del file.">controllo_estensione</a>(file, <a class="code" href="handler_8cc.html#a13fe06ea7d409828447a956f7e130977">ESTENSIONE_BACKUP</a>);</div>
<div class="line">                <a class="code" href="debug_8h.html#afff1e38d74b3116b7a77d0272adf2dbf" title="Mostra i vari passaggi fondamentali.">D1</a>(cout&lt;&lt;file&lt;&lt;endl);</div>
<div class="line">                gtk_file_chooser_set_current_name(chooser, file);</div>
<div class="line">        }</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="af7e31c6ad8bb85081abc321db03c1a2b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void handler_inizializza_cir </td>
          <td>(</td>
          <td class="paramtype">GtkButton *&#160;</td>
          <td class="paramname"><em>button</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Crea un nuovo circolo con i campi inseriti. </p>
<div class="fragment"><div class="line">{</div>
<div class="line">        GtkEntry *entry_nome = GTK_ENTRY( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;nome_cir&quot;</span>) );</div>
<div class="line">        GtkEntry *entry_indirizzo = GTK_ENTRY( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;indirizzo_cir&quot;</span>) );</div>
<div class="line">        GtkEntry *entry_email = GTK_ENTRY( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;indirizzo_cir&quot;</span>) );</div>
<div class="line">        GtkEntry *entry_telefono = GTK_ENTRY( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;telefono_cir&quot;</span>) );</div>
<div class="line"></div>
<div class="line">        <span class="keyword">const</span> <span class="keywordtype">char</span> *nome = gtk_entry_get_text(entry_nome);</div>
<div class="line">        <span class="keyword">const</span> <span class="keywordtype">char</span> *indirizzo = gtk_entry_get_text(entry_indirizzo);</div>
<div class="line">        <span class="keyword">const</span> <span class="keywordtype">char</span> *email = gtk_entry_get_text(entry_email);</div>
<div class="line">        <span class="keyword">const</span> <span class="keywordtype">char</span> *telefono = gtk_entry_get_text(entry_telefono);</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> (nome[0] == <span class="charliteral">&#39;\0&#39;</span>){</div>
<div class="line">                <a class="code" href="handler_8cc.html#a8713b519a311ec08fc899e7fa176f963" title="Mostra una finestra di errore.">finestra_errore</a>(<span class="stringliteral">&quot;Inserire un nome per il circolo&quot;</span>);</div>
<div class="line">                <span class="keywordflow">return</span>;</div>
<div class="line">        }</div>
<div class="line">        </div>
<div class="line">        <span class="keywordtype">char</span> *dir_cir = <a class="code" href="file__IO_8cc.html#aa82e7288bfea5165a7d63b66eaea48d5" title="Ritorna la directory del circolo.">get_dir_circolo</a>(nome);</div>
<div class="line">        <span class="keywordflow">if</span> ( g_file_test(dir_cir, G_FILE_TEST_IS_DIR) ){</div>
<div class="line">                <a class="code" href="handler_8cc.html#a8713b519a311ec08fc899e7fa176f963" title="Mostra una finestra di errore.">finestra_errore</a>(<span class="stringliteral">&quot;Esiste già un circolo con questo nome&quot;</span>);</div>
<div class="line">                g_free(dir_cir);</div>
<div class="line">                <span class="keywordflow">return</span>;</div>
<div class="line">        }</div>
<div class="line">        g_free(dir_cir);</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> ( <a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a> != 0 &amp;&amp; !<a class="code" href="handler_8cc.html#a242b4c7315a053af14f55798531abfeb" title="Mostra una finestra di dialogo con i pulsanti SI e NO.">alert</a>(<span class="stringliteral">&quot;Verrà chiuso il circolo attuale. Continuare?&quot;</span>) )</div>
<div class="line">                <span class="keywordflow">return</span>;</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> ( <a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a> != 0 )</div>
<div class="line">                <a class="code" href="accesso__dati_8cc.html#a6ab541cc7d58b854e085a8fcef76e581" title="Elimina il circolo dalla memoria.">elimina_circolo</a>(<a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>);       </div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> ( (<a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a> = <a class="code" href="accesso__dati_8cc.html#a5f411b92b995ff84d3acd8bc0da1191e" title="Inizializza il Circolo con i dati della società.">inizializza_circolo</a>(nome, indirizzo, email, telefono)) == 0 )</div>
<div class="line">                <a class="code" href="handler_8cc.html#a8713b519a311ec08fc899e7fa176f963" title="Mostra una finestra di errore.">finestra_errore</a>(<span class="stringliteral">&quot;Impossibile creare il circolo&quot;</span>);</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> ( !<a class="code" href="file__IO_8cc.html#a09f4d48bb1bddd3b628ba62f8d276c49" title="Salva su file i dati del circolo.">salva_circolo</a>(<a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>) )</div>
<div class="line">                <a class="code" href="handler_8cc.html#a8713b519a311ec08fc899e7fa176f963" title="Mostra una finestra di errore.">finestra_errore</a>(<span class="stringliteral">&quot;Attenzione! non è stato possibile salvare il circolo su file\n alla chiusura del programma \</span></div>
<div class="line"><span class="stringliteral">                                il circolo non sarà più recuperabile&quot;</span>);</div>
<div class="line"></div>
<div class="line">        gtk_widget_set_sensitive( GTK_WIDGET( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;menu_modifica&quot;</span>) ), TRUE);</div>
<div class="line">        gtk_widget_set_sensitive( GTK_WIDGET( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;menu_backup&quot;</span>) ), TRUE);</div>
<div class="line">        gtk_widget_set_sensitive( GTK_WIDGET( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;menu_visualizza&quot;</span>) ), TRUE);        </div>
<div class="line"></div>
<div class="line">        <a class="code" href="handler_8cc.html#a3cea95cc33a7419edc4bc03872da2c2c" title="Nasconde la finestra.">nascondi_finestra</a>( gtk_widget_get_toplevel( GTK_WIDGET(button) ), NULL, NULL);</div>
<div class="line">        </div>
<div class="line">        <a class="code" href="handler_8cc.html#ad40d4d29e5f9fb374a70fbe0782de844" title="Carica il circolo selezionato.">handler_carica_circolo</a>(NULL, (<span class="keywordtype">void</span> *) nome);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aab2674f9e310187d1f2718e13a440729"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void handler_mostra_ora </td>
          <td>(</td>
          <td class="paramtype">GtkButton *&#160;</td>
          <td class="paramname"><em>button</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>ora_</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Mostra i dati dell'ora. </p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">ora_</td><td>Ora da visualizzare </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line">{</div>
<div class="line">        GObject *cella = G_OBJECT(button);</div>
<div class="line">        <a class="code" href="handler_8cc.html#ad2ef6a61f674ffd893c018201b796901">tipo_ora</a> tipo = (<a class="code" href="handler_8cc.html#ad2ef6a61f674ffd893c018201b796901">tipo_ora</a>) GPOINTER_TO_INT( g_object_get_data(cella, <span class="stringliteral">&quot;tipo_ora&quot;</span>) );</div>
<div class="line">        <a class="code" href="structcampo__t.html" title="Struttura rappresentate i campi.">campo_t</a> *campo = (<a class="code" href="structcampo__t.html" title="Struttura rappresentate i campi.">campo_t</a> *) g_object_get_data(cella, <span class="stringliteral">&quot;campo&quot;</span>);</div>
<div class="line">        gpointer ora_ = g_object_get_data(cella, <span class="stringliteral">&quot;ora&quot;</span>);</div>
<div class="line"></div>
<div class="line">        <span class="keywordtype">char</span> *campo_numero = g_strdup_printf(<span class="stringliteral">&quot;%d&quot;</span>, campo-&gt;<a class="code" href="structcampo__t.html#a6e0a6002a8c0d360f22d4a30bc1e37d0">numero</a>);</div>
<div class="line"></div>
<div class="line">        GtkCalendar *calendario = GTK_CALENDAR( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;calendario&quot;</span>) );</div>
<div class="line">        GtkWidget *box_n = GTK_WIDGET( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;ora_nuova&quot;</span>) );</div>
<div class="line">        GtkWidget *box_v = GTK_WIDGET( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;ora_esistente&quot;</span>) );</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> (tipo == <a class="code" href="handler_8cc.html#ad2ef6a61f674ffd893c018201b796901a103e268eeab0324c0d636174572035c5">VUOTA</a>){</div>
<div class="line">                GtkListStore *list = GTK_LIST_STORE( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;giocatori&quot;</span>) );</div>
<div class="line">                gtk_list_store_clear(list);</div>
<div class="line">                g_list_foreach(<a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>-&gt;<a class="code" href="structcircolo__t.html#aa17088e0fc000cfbc4c6b08c0c18cef2">giocatori</a>, <a class="code" href="handler_8cc.html#a8bf2479da80daf509d7af3dca324e92c" title="Inserisce il giocatore nella ListStore.">insert_list_giocatore</a>, list);</div>
<div class="line"></div>
<div class="line">                GtkComboBox *nome = GTK_COMBO_BOX( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;nome_ora_n&quot;</span>) );</div>
<div class="line">                GtkEntry *orario = GTK_ENTRY( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;orario_ora_n&quot;</span>) );</div>
<div class="line">                GtkEntry *durata = GTK_ENTRY( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;durata_ora_n&quot;</span>) );</div>
<div class="line">                GtkEntry *data = GTK_ENTRY( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;data_ora_n&quot;</span>) );</div>
<div class="line">                GtkLabel *campo_label = GTK_LABEL( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;campo_ora_n&quot;</span>) );</div>
<div class="line"></div>
<div class="line">                <span class="keywordtype">char</span> *orario_ = <a class="code" href="handler_8cc.html#a95a01084740ad1073c35012600beada7" title="Trsforma un intero in una stringa orario.">STRINGA_ORARIO</a>( GPOINTER_TO_INT(ora_) );</div>
<div class="line">                <span class="keywordtype">char</span> *data_ = <a class="code" href="handler_8cc.html#a3b9e5487e0942b6b558d5b19a39fbc2d" title="Restituisce una stringa con la data.">get_stringa_data</a>(calendario);</div>
<div class="line"></div>
<div class="line">                gtk_combo_box_set_active(nome, 0);</div>
<div class="line">                gtk_entry_set_text(orario, orario_ );</div>
<div class="line">                gtk_entry_set_text(durata, <span class="stringliteral">&quot;01:00&quot;</span>);</div>
<div class="line">                gtk_entry_set_text(data, data_);</div>
<div class="line">                gtk_label_set_text(campo_label, campo_numero);</div>
<div class="line"></div>
<div class="line">                g_object_set_data( G_OBJECT(box_n), <span class="stringliteral">&quot;campo&quot;</span>, campo);</div>
<div class="line"></div>
<div class="line">                g_free(orario_);</div>
<div class="line">                g_free(data_);</div>
<div class="line">                g_free(campo_numero);</div>
<div class="line">                </div>
<div class="line">                gtk_widget_set_visible(box_n, TRUE);</div>
<div class="line">                gtk_widget_set_visible(box_v, FALSE);</div>
<div class="line"></div>
<div class="line">                <span class="keywordflow">return</span>;</div>
<div class="line">        }</div>
<div class="line">        </div>
<div class="line">        <a class="code" href="debug_8h.html#afff1e38d74b3116b7a77d0272adf2dbf" title="Mostra i vari passaggi fondamentali.">D1</a>(cout&lt;&lt;<span class="stringliteral">&quot;ora non vuota&quot;</span>&lt;&lt;endl)</div>
<div class="line"></div>
<div class="line">        <a class="code" href="structora__t.html" title="Struttura rappresentante le ore prenotate.">ora_t</a> *ora = (<a class="code" href="structora__t.html" title="Struttura rappresentante le ore prenotate.">ora_t</a> *) ora_;</div>
<div class="line"></div>
<div class="line">        GtkLabel *nome = GTK_LABEL( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, &quot;nome_ora&quot;) );</div>
<div class="line">        GtkLabel *orario = GTK_LABEL( gtk_builder_get_object(build, &quot;orario_ora&quot;) );</div>
<div class="line">        GtkLabel *data = GTK_LABEL( gtk_builder_get_object(build, &quot;data_ora&quot;) );</div>
<div class="line">        GtkLabel *durata = GTK_LABEL( gtk_builder_get_object(build, &quot;durata_ora&quot;) );</div>
<div class="line">        GtkLabel *campo_label = GTK_LABEL( gtk_builder_get_object(build, &quot;campo_ora&quot;) );</div>
<div class="line"></div>
<div class="line">        <span class="keywordtype">char</span> *orario_ = <a class="code" href="handler_8cc.html#a95a01084740ad1073c35012600beada7" title="Trsforma un intero in una stringa orario.">STRINGA_ORARIO</a>(ora-&gt;orario);</div>
<div class="line">        <span class="keywordtype">char</span> *durata_ = <a class="code" href="handler_8cc.html#a95a01084740ad1073c35012600beada7" title="Trsforma un intero in una stringa orario.">STRINGA_ORARIO</a>(ora-&gt;durata);</div>
<div class="line"></div>
<div class="line">        gtk_label_set_text(nome, <a class="code" href="accesso__dati_8cc.html#ac8878839cd059af1d8b17b2a466914b5" title="Restituisce il nome associato all&#39;ora.">get_nome_ora</a>(ora));</div>
<div class="line">        gtk_label_set_text(orario, orario_);</div>
<div class="line">        gtk_label_set_text(data, ora-&gt;data-&gt;str);</div>
<div class="line">        gtk_label_set_text(durata, durata_);</div>
<div class="line">        gtk_label_set_text(campo_label, campo_numero);</div>
<div class="line"></div>
<div class="line">        g_object_set_data( G_OBJECT(box_v), &quot;ora&quot;, ora);</div>
<div class="line">        g_object_set_data( G_OBJECT(box_v), &quot;campo&quot;, campo);    </div>
<div class="line"></div>
<div class="line">        gtk_widget_set_visible(box_v, TRUE);</div>
<div class="line">        gtk_widget_set_visible(box_n, FALSE);</div>
<div class="line"></div>
<div class="line">        g_free(orario_);</div>
<div class="line">        g_free(durata_);</div>
<div class="line">        g_free(campo_numero);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a5f471e1128fa122a4509ca3864973ac6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void handler_nuovo_campo </td>
          <td>(</td>
          <td class="paramtype">GtkMenuItem *&#160;</td>
          <td class="paramname"><em>item</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>campo_</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Setta i campi della finestra agg_campo. </p>
<p>Setti i campi bianchi se campo_ è NULL; con i dati di campo_ altrimenti </p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">campo_</td><td>Eventuale vecchio campo </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line">{</div>
<div class="line">        <a class="code" href="structcampo__t.html" title="Struttura rappresentate i campi.">campo_t</a> *campo = (<a class="code" href="structcampo__t.html" title="Struttura rappresentate i campi.">campo_t</a> *) campo_;</div>
<div class="line"></div>
<div class="line">        GtkWidget *window = GTK_WIDGET( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;agg_campo&quot;</span>) );</div>
<div class="line">        GObject *pulsante = gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;campo_ok&quot;</span>);</div>
<div class="line"></div>
<div class="line">        GtkSpinButton *entry_numero = GTK_SPIN_BUTTON( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;numero_c&quot;</span>) );</div>
<div class="line">        GtkComboBox *entry_copertura = GTK_COMBO_BOX( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;copertura_c&quot;</span>) );</div>
<div class="line">        GtkComboBox *entry_terreno = GTK_COMBO_BOX( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;terreno_c&quot;</span>) );</div>
<div class="line">        GtkEntry *entry_note = GTK_ENTRY( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;note_c&quot;</span>) );</div>
<div class="line">        </div>
<div class="line">        <span class="keywordflow">if</span> (campo != NULL){</div>
<div class="line">                gtk_spin_button_set_value(entry_numero, campo-&gt;<a class="code" href="structcampo__t.html#a6e0a6002a8c0d360f22d4a30bc1e37d0">numero</a>);</div>
<div class="line">                gtk_combo_box_set_active(entry_copertura, campo-&gt;<a class="code" href="structcampo__t.html#a98a13af547edea0107d7def51feeb923">copertura</a>);</div>
<div class="line">                gtk_combo_box_set_active(entry_terreno, campo-&gt;<a class="code" href="structcampo__t.html#ab875e984264bf393977eb07cfe2f7341">terreno</a>);</div>
<div class="line">                gtk_entry_set_text(entry_note, campo-&gt;<a class="code" href="structcampo__t.html#aada0759d9033cc156fbea6ef35a272e0">note</a>-&gt;str);</div>
<div class="line">        } </div>
<div class="line">        <span class="keywordflow">else</span> {</div>
<div class="line">                gtk_spin_button_set_value(entry_numero, <a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>-&gt;<a class="code" href="structcircolo__t.html#ad936c96509d0ba268f3fba9ce0157222">n_campi</a> + 1);</div>
<div class="line">                gtk_combo_box_set_active(entry_copertura, 0);</div>
<div class="line">                gtk_combo_box_set_active(entry_terreno, 0);</div>
<div class="line">                gtk_entry_set_text(entry_note, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        g_object_set_data(pulsante, <span class="stringliteral">&quot;campo&quot;</span>, campo);    </div>
<div class="line"></div>
<div class="line"></div>
<div class="line">        <a class="code" href="handler_8cc.html#abef113ade0ebf32552faf22013fb51e6" title="Mostra a video la finestra.">mostra_finestra</a>(NULL, window);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a1855f2711061454499303f82de47ff24"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void handler_nuovo_giocatore </td>
          <td>(</td>
          <td class="paramtype">GtkMenuItem *&#160;</td>
          <td class="paramname"><em>item</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>giocatore_</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Setta i campi della finestra agg_giocatore. </p>
<p>Setta i campi bianchi se giocatore_ è NULL; con i dati di giocatore_ altrimenti </p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">giocatore_</td><td>Vecchio giocatore </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line">{</div>
<div class="line">        <a class="code" href="structgiocatore__t.html" title="Struttura rappresentante i giocatori.">giocatore_t</a> *giocatore = (<a class="code" href="structgiocatore__t.html" title="Struttura rappresentante i giocatori.">giocatore_t</a> *) giocatore_;</div>
<div class="line"></div>
<div class="line">        GtkWidget *window = GTK_WIDGET( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;agg_giocatore&quot;</span>) );</div>
<div class="line">        GObject *pulsante = gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;giocatore_ok&quot;</span>);</div>
<div class="line"></div>
<div class="line">        GtkEntry *entry_nome = GTK_ENTRY( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;nome_g&quot;</span>) );</div>
<div class="line">        GtkEntry *entry_cognome = GTK_ENTRY( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;cognome_g&quot;</span>) );</div>
<div class="line">        GtkEntry *entry_nascita = GTK_ENTRY( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;nascita_g&quot;</span>) );</div>
<div class="line">        GtkEntry *entry_tessera = GTK_ENTRY( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;tessera_g&quot;</span>) );</div>
<div class="line">        GtkEntry *entry_telefono = GTK_ENTRY( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;telefono_g&quot;</span>) );</div>
<div class="line">        GtkEntry *entry_email = GTK_ENTRY( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;email_g&quot;</span>) );</div>
<div class="line">        GtkEntry *entry_classifica = GTK_ENTRY( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;classifica_g&quot;</span>) );</div>
<div class="line">        GtkEntry *entry_circolo = GTK_ENTRY( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;circolo_g&quot;</span>) );</div>
<div class="line">        GtkToggleButton *toggle_socio = GTK_TOGGLE_BUTTON( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;socio_g&quot;</span>) );</div>
<div class="line">        GtkToggleButton *toggle_retta = GTK_TOGGLE_BUTTON( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;retta_g&quot;</span>) );</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> (giocatore != NULL){</div>
<div class="line">                gtk_entry_set_text(entry_nome, giocatore-&gt;<a class="code" href="structgiocatore__t.html#ac3f1b0dcd6f3439adbc2e86db6bea952">nome</a>-&gt;str);</div>
<div class="line">                gtk_entry_set_text(entry_cognome, giocatore-&gt;<a class="code" href="structgiocatore__t.html#ad02b92861fc7ee234cad9bb5a730a408">cognome</a>-&gt;str);</div>
<div class="line">                gtk_entry_set_text(entry_nascita, giocatore-&gt;<a class="code" href="structgiocatore__t.html#a22cdca2a4d519bfbd64649d4f4cb266f">nascita</a>-&gt;str);</div>
<div class="line">                gtk_entry_set_text(entry_tessera, giocatore-&gt;<a class="code" href="structgiocatore__t.html#aed14cc86d81c10cf2cc50165cfc5a59f">tessera</a>-&gt;str);</div>
<div class="line">                gtk_entry_set_text(entry_telefono, giocatore-&gt;<a class="code" href="structgiocatore__t.html#a7666d4d5062f1c86860a2fbc41ba1042">telefono</a>-&gt;str);</div>
<div class="line">                gtk_entry_set_text(entry_email, giocatore-&gt;<a class="code" href="structgiocatore__t.html#a90aeb6b0953f3416e27ef9e1a121e743">email</a>-&gt;str);</div>
<div class="line">                gtk_entry_set_text(entry_classifica, giocatore-&gt;<a class="code" href="structgiocatore__t.html#abac0936681f2728909612be2f0e47a46">classifica</a>-&gt;str);</div>
<div class="line">                gtk_entry_set_text(entry_circolo, giocatore-&gt;<a class="code" href="structgiocatore__t.html#a5275e8614d0c0d2270d0cf9929214ebf">circolo</a>-&gt;str);</div>
<div class="line">                gtk_toggle_button_set_active(toggle_socio, giocatore-&gt;<a class="code" href="structgiocatore__t.html#ab483a08573f49ac1b96761f869921826">socio</a>);</div>
<div class="line">                gtk_toggle_button_set_active(toggle_retta, giocatore-&gt;<a class="code" href="structgiocatore__t.html#aa9cd22efd9d0fa8a1de98dafcaeacdbd">retta</a>);</div>
<div class="line">        } </div>
<div class="line">        <span class="keywordflow">else</span> {</div>
<div class="line">                gtk_entry_set_text(entry_nome, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line">                gtk_entry_set_text(entry_cognome, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line">                gtk_entry_set_text(entry_nascita, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line">                gtk_entry_set_text(entry_tessera, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line">                gtk_entry_set_text(entry_telefono, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line">                gtk_entry_set_text(entry_email, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line">                gtk_entry_set_text(entry_classifica, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line">                gtk_entry_set_text(entry_circolo, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line">                gtk_toggle_button_set_active(toggle_socio, <span class="keyword">false</span>);</div>
<div class="line">                gtk_toggle_button_set_active(toggle_retta, <span class="keyword">false</span>);</div>
<div class="line"></div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        g_object_set_data(pulsante, <span class="stringliteral">&quot;giocatore&quot;</span>, giocatore);    </div>
<div class="line"></div>
<div class="line">        <a class="code" href="handler_8cc.html#abef113ade0ebf32552faf22013fb51e6" title="Mostra a video la finestra.">mostra_finestra</a>(NULL, window);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aec22e99260660fa8b092cf2cd98ff945"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void handler_prenota_ora </td>
          <td>(</td>
          <td class="paramtype">GtkButton *&#160;</td>
          <td class="paramname"><em>button</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Prenota un ora in base ai dati inseriti. </p>
<div class="fragment"><div class="line">{</div>
<div class="line">        <a class="code" href="debug_8h.html#afff1e38d74b3116b7a77d0272adf2dbf" title="Mostra i vari passaggi fondamentali.">D1</a>(cout&lt;&lt;<span class="stringliteral">&quot;prenota ora&quot;</span>&lt;&lt;endl)</div>
<div class="line"></div>
<div class="line">        GObject *box_n = gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, &quot;ora_nuova&quot;);</div>
<div class="line"></div>
<div class="line">        gpointer campo_ = g_object_get_data(box_n, &quot;campo&quot;);</div>
<div class="line"></div>
<div class="line">        GtkComboBox *selezione = GTK_COMBO_BOX( gtk_builder_get_object(build, &quot;nome_ora_n&quot;) );</div>
<div class="line">        GtkEntry *entry_orario = GTK_ENTRY( gtk_builder_get_object(build, &quot;orario_ora_n&quot;) );</div>
<div class="line">        GtkEntry *entry_durata = GTK_ENTRY( gtk_builder_get_object(build, &quot;durata_ora_n&quot;) );</div>
<div class="line">        GtkEntry *entry_data = GTK_ENTRY( gtk_builder_get_object(build, &quot;data_ora_n&quot;) );</div>
<div class="line"></div>
<div class="line">        const <span class="keywordtype">char</span> *orario_ = gtk_entry_get_text(entry_orario);</div>
<div class="line">        const <span class="keywordtype">char</span> *durata_ = gtk_entry_get_text(entry_durata);</div>
<div class="line">        const <span class="keywordtype">char</span> *data = gtk_entry_get_text(entry_data);      </div>
<div class="line"></div>
<div class="line">        <span class="keywordtype">int</span> orario = <a class="code" href="handler_8cc.html#aa1ebd22d0b9b412732437f261124f538" title="Converte una stringa rappresentante un orario in intero.">controlla_formato_ora</a>(orario_);</div>
<div class="line">        <span class="keywordtype">int</span> durata = <a class="code" href="handler_8cc.html#aa1ebd22d0b9b412732437f261124f538" title="Converte una stringa rappresentante un orario in intero.">controlla_formato_ora</a>(durata_);</div>
<div class="line"></div>
<div class="line">        if (orario &lt; 0 || orario &gt;= <a class="code" href="handler_8cc.html#af45dc783e55c4fd9bcebf41135fe5da9">ORA_CHIUSURA</a>*60){</div>
<div class="line">                <a class="code" href="debug_8h.html#afff1e38d74b3116b7a77d0272adf2dbf" title="Mostra i vari passaggi fondamentali.">D1</a>(cout&lt;&lt;<span class="stringliteral">&quot;orario errato&quot;</span>&lt;&lt;endl)</div>
<div class="line">                <a class="code" href="handler_8cc.html#a8713b519a311ec08fc899e7fa176f963" title="Mostra una finestra di errore.">finestra_errore</a>(&quot;Orario Errato&quot;);</div>
<div class="line">                return;</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        if (durata &lt; 0 || durata &gt; ORA_CHIUSURA*60 - orario){</div>
<div class="line">                <a class="code" href="debug_8h.html#afff1e38d74b3116b7a77d0272adf2dbf" title="Mostra i vari passaggi fondamentali.">D1</a>(cout&lt;&lt;<span class="stringliteral">&quot;durata errata&quot;</span>&lt;&lt;endl)</div>
<div class="line">                <a class="code" href="handler_8cc.html#a8713b519a311ec08fc899e7fa176f963" title="Mostra una finestra di errore.">finestra_errore</a>(&quot;Durata Errata&quot;);</div>
<div class="line">                return;</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        <a class="code" href="structcampo__t.html" title="Struttura rappresentate i campi.">campo_t</a> *campo = (<a class="code" href="structcampo__t.html" title="Struttura rappresentate i campi.">campo_t</a> *) campo_;</div>
<div class="line"></div>
<div class="line">        if ( !<a class="code" href="handler_8cc.html#a1f004e54cac4b7773c81f83c79e8999a" title="Controlla se un ora è disponibile.">controlla_disponibilita_ora</a>(campo, orario, durata) ){</div>
<div class="line">                <a class="code" href="handler_8cc.html#a8713b519a311ec08fc899e7fa176f963" title="Mostra una finestra di errore.">finestra_errore</a>(<span class="stringliteral">&quot;Ora non disponibile&quot;</span>);</div>
<div class="line">                <span class="keywordflow">return</span>;</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        <a class="code" href="structgiocatore__t.html" title="Struttura rappresentante i giocatori.">giocatore_t</a> *giocatore = 0;</div>
<div class="line">        GtkTreeIter iter;</div>
<div class="line">        GtkTreeModel *model = gtk_combo_box_get_model(selezione);</div>
<div class="line">        </div>
<div class="line">        <span class="keywordflow">if</span> ( !gtk_combo_box_get_active_iter(selezione, &amp;iter) ){</div>
<div class="line">                <a class="code" href="handler_8cc.html#a8713b519a311ec08fc899e7fa176f963" title="Mostra una finestra di errore.">finestra_errore</a>(<span class="stringliteral">&quot;Selezionare un giocatore&quot;</span>);</div>
<div class="line">                <span class="keywordflow">return</span>;</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        gtk_tree_model_get(model, &amp;iter, 7, &amp;giocatore, -1);</div>
<div class="line"></div>
<div class="line">        <a class="code" href="structora__t.html" title="Struttura rappresentante le ore prenotate.">ora_t</a> *ora = <a class="code" href="accesso__dati_8cc.html#afb27649ae77b89edeb03bc022d948820" title="Aggiunge un ora al campo.">aggiungi_ora</a>(orario, data, durata, giocatore, campo);</div>
<div class="line">        <a class="code" href="file__IO_8cc.html#ab7a55ef58177bf8857c1d1121ce6c637" title="Salva l&#39;ora su file.">salva_ora</a>(ora, campo, <a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a>);</div>
<div class="line"></div>
<div class="line">        <a class="code" href="handler_8cc.html#ab161e7dfc521058bc5bd03f723a106a8" title="Aggiorna la tabella delle ore.">aggiorna_tabella_ore</a>(NULL, NULL);       </div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a0a32ee04423fecb673625467453ff022"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void handler_ripristina </td>
          <td>(</td>
          <td class="paramtype">GtkMenuItem *&#160;</td>
          <td class="paramname"><em>button</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Mostra la finestra per il ripristino di un backup. </p>
<div class="fragment"><div class="line">{</div>
<div class="line">        gint response;</div>
<div class="line">        <span class="keywordtype">bool</span> stato = <span class="keyword">false</span>;</div>
<div class="line">        <span class="keywordtype">char</span> *file = 0;</div>
<div class="line">        GtkFileChooser *scegli_file = GTK_FILE_CHOOSER( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;scegli_file&quot;</span>) );</div>
<div class="line">        </div>
<div class="line">        gtk_file_chooser_set_action(scegli_file, GTK_FILE_CHOOSER_ACTION_OPEN);</div>
<div class="line"></div>
<div class="line">        <a class="code" href="handler_8cc.html#abef113ade0ebf32552faf22013fb51e6" title="Mostra a video la finestra.">mostra_finestra</a>(NULL, scegli_file);</div>
<div class="line">        </div>
<div class="line">        response = gtk_dialog_run( GTK_DIALOG(scegli_file) );</div>
<div class="line">        <span class="keywordflow">if</span> (response == GTK_RESPONSE_YES){</div>
<div class="line">                file = gtk_file_chooser_get_filename(scegli_file);</div>
<div class="line">                <a class="code" href="debug_8h.html#afff1e38d74b3116b7a77d0272adf2dbf" title="Mostra i vari passaggi fondamentali.">D1</a>(cout&lt;&lt;<span class="stringliteral">&quot;nome: &quot;</span>&lt;&lt;file&lt;&lt;endl);</div>
<div class="line">                <a class="code" href="debug_8h.html#afff1e38d74b3116b7a77d0272adf2dbf" title="Mostra i vari passaggi fondamentali.">D1</a>(cout&lt;&lt;<span class="stringliteral">&quot;nome: &quot;</span>&lt;&lt;file&lt;&lt;endl);</div>
<div class="line">                <span class="keywordtype">char</span> *nome_cir = <a class="code" href="file__IO_8cc.html#a76f8fd85c112dc80647fa4892339570c" title="Ritorna il nome del circolo ai cui fa riferimento il file di backup.">get_nome_backup</a>(file);</div>
<div class="line"></div>
<div class="line">                <span class="keywordflow">if</span> ( <a class="code" href="file__IO_8cc.html#a51256bf33628453f9e0e7c99b76e7374" title="Controlla se esiste un circolo con tale nome.">circolo_esistente</a>(nome_cir) ){</div>
<div class="line">                        <span class="comment">//Circolo già presente</span></div>
<div class="line">                        <a class="code" href="debug_8h.html#afff1e38d74b3116b7a77d0272adf2dbf" title="Mostra i vari passaggi fondamentali.">D1</a>(cout&lt;&lt;<span class="stringliteral">&quot;Circolo esistente&quot;</span>&lt;&lt;endl)</div>
<div class="line">                        if ( <a class="code" href="handler_8cc.html#a242b4c7315a053af14f55798531abfeb" title="Mostra una finestra di dialogo con i pulsanti SI e NO.">alert</a>(&quot;Questo <a class="code" href="file__IO_8cc.html#a6b5cce7059635c9b27474d6b4d54d4f6" title="Crea un backup del circolo.">backup</a> fa riferimento ad un <a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a> presente. Vuoi sovrascriverlo?&quot;) ){</div>
<div class="line">                                <a class="code" href="file__IO_8cc.html#a75d94cb4abf6c12c555117417dbd21c1" title="Elimina l&#39;intera struttura delle directory rapprensentanti il circolo.">elimina_file_circolo</a>(nome_cir);</div>
<div class="line">                        }</div>
<div class="line">                        <span class="keywordflow">else</span></div>
<div class="line">                        {</div>
<div class="line">                                g_free(file);</div>
<div class="line">                                g_free(nome_cir);</div>
<div class="line">                                <span class="keywordflow">return</span>;</div>
<div class="line">                        }</div>
<div class="line">                }</div>
<div class="line"></div>
<div class="line">                stato = <a class="code" href="file__IO_8cc.html#af656044d932e2dc1a62b5a39576d1f0e" title="Ripristina un backup.">ripristina</a>(file);</div>
<div class="line">                <a class="code" href="handler_8cc.html#ad40d4d29e5f9fb374a70fbe0782de844" title="Carica il circolo selezionato.">handler_carica_circolo</a>(NULL, nome_cir);</div>
<div class="line"></div>
<div class="line">                g_free(file);</div>
<div class="line">                g_free(nome_cir);</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> (stato == <span class="keyword">false</span>)</div>
<div class="line">                <a class="code" href="handler_8cc.html#a8713b519a311ec08fc899e7fa176f963" title="Mostra una finestra di errore.">finestra_errore</a>(<span class="stringliteral">&quot;Non è stato possibile ripristinare il backup&quot;</span>);</div>
<div class="line">        </div>
<div class="line">        <a class="code" href="handler_8cc.html#a3cea95cc33a7419edc4bc03872da2c2c" title="Nasconde la finestra.">nascondi_finestra</a>( GTK_WIDGET(scegli_file), NULL, NULL);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a2a4e6d3e35ade8b29eee9e145a389599"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void handler_visualizza_campo </td>
          <td>(</td>
          <td class="paramtype">GtkButton *&#160;</td>
          <td class="paramname"><em>button</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Visualizza il campo selezionato. </p>
<div class="fragment"><div class="line">{</div>
<div class="line">        GtkWidget *window = GTK_WIDGET( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;elenco_c&quot;</span>) );</div>
<div class="line">        </div>
<div class="line">        GtkTreeIter iter;</div>
<div class="line">        GtkTreeModel *model;</div>
<div class="line">        <a class="code" href="structcampo__t.html" title="Struttura rappresentate i campi.">campo_t</a> *campo_sel = 0;</div>
<div class="line">        GtkTreeView *view = GTK_TREE_VIEW( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;campi_view&quot;</span>) );</div>
<div class="line">        GtkTreeSelection *selezione = gtk_tree_view_get_selection(view);</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> ( !gtk_tree_selection_get_selected(selezione, &amp;model, &amp;iter) ){</div>
<div class="line">                <a class="code" href="handler_8cc.html#a8713b519a311ec08fc899e7fa176f963" title="Mostra una finestra di errore.">finestra_errore</a>(<span class="stringliteral">&quot;Selezionare un elemento&quot;</span>);</div>
<div class="line">                <span class="keywordflow">return</span>;</div>
<div class="line">        }</div>
<div class="line">        gtk_tree_model_get(model, &amp;iter, 3, &amp;campo_sel, -1);</div>
<div class="line">        </div>
<div class="line">        <a class="code" href="handler_8cc.html#a3cea95cc33a7419edc4bc03872da2c2c" title="Nasconde la finestra.">nascondi_finestra</a>(window, NULL, NULL);</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span>(campo_sel != NULL)</div>
<div class="line">                <a class="code" href="handler_8cc.html#a5f471e1128fa122a4509ca3864973ac6" title="Setta i campi della finestra agg_campo.">handler_nuovo_campo</a>(NULL, campo_sel);</div>
<div class="line">        </div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ac75d3e710277af666e435741cf424851"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void handler_visualizza_giocatore </td>
          <td>(</td>
          <td class="paramtype">GtkButton *&#160;</td>
          <td class="paramname"><em>button</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Visualizza il giocatore selezionato. </p>
<div class="fragment"><div class="line">{</div>
<div class="line">        GtkWidget *window = GTK_WIDGET( gtk_widget_get_toplevel( GTK_WIDGET(button) ) );</div>
<div class="line">        </div>
<div class="line">        GtkTreeIter iter;</div>
<div class="line">        GtkTreeModel *model;</div>
<div class="line">        <a class="code" href="structgiocatore__t.html" title="Struttura rappresentante i giocatori.">giocatore_t</a> *giocatore_sel = 0;</div>
<div class="line">        GtkTreeView *view = GTK_TREE_VIEW( gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;giocatori_view&quot;</span>) );</div>
<div class="line">        GtkTreeSelection *selezione = gtk_tree_view_get_selection(view);</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> ( !gtk_tree_selection_get_selected(selezione, &amp;model, &amp;iter) ){</div>
<div class="line">                <a class="code" href="handler_8cc.html#a8713b519a311ec08fc899e7fa176f963" title="Mostra una finestra di errore.">finestra_errore</a>(<span class="stringliteral">&quot;Selezionare un elemento&quot;</span>);</div>
<div class="line">                <span class="keywordflow">return</span>;</div>
<div class="line">        }</div>
<div class="line">        gtk_tree_model_get(model, &amp;iter, 7, &amp;giocatore_sel, -1);</div>
<div class="line">        </div>
<div class="line">        <a class="code" href="handler_8cc.html#a3cea95cc33a7419edc4bc03872da2c2c" title="Nasconde la finestra.">nascondi_finestra</a>(window, NULL, NULL);</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span>(giocatore_sel != NULL)</div>
<div class="line">                <a class="code" href="handler_8cc.html#a1855f2711061454499303f82de47ff24" title="Setta i campi della finestra agg_giocatore.">handler_nuovo_giocatore</a>(NULL, giocatore_sel);</div>
<div class="line">        </div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aafd920a801e75d4ca88223fb492d3ba2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void inserisci_ore_vuote </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>inizio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>fine</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">GtkGrid *&#160;</td>
          <td class="paramname"><em>tabella</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcampo__t.html">campo_t</a> *&#160;</td>
          <td class="paramname"><em>campo</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Inserisce ore vuote nella tabella. </p>
<p>Inserisce nella tabella ore vuote dall'inizio alla fine della riga del campo </p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">inizio</td><td>Inizio dell'inserimento </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">fine</td><td>Fine dell'inserimento </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">tabella</td><td>Tabella dove inserire </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">campo</td><td>Campo dove inserire le ore </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line">{</div>
<div class="line">        <a class="code" href="debug_8h.html#afff1e38d74b3116b7a77d0272adf2dbf" title="Mostra i vari passaggi fondamentali.">D1</a>(cout&lt;&lt;<span class="stringliteral">&quot;inserimento ore vuote&quot;</span>&lt;&lt;endl)</div>
<div class="line">        <a class="code" href="debug_8h.html#a43e8ca05b2c0abb00d31e535b4186b7e" title="Mostra stato variabili ed errori veri e propri.">D2</a>(cout&lt;&lt;&quot;da: &quot;&lt;&lt;inizio&lt;&lt;&quot;a: &quot;&lt;&lt;fine&lt;&lt;endl);    </div>
<div class="line">        </div>
<div class="line">        if (inizio == fine)</div>
<div class="line">                return;</div>
<div class="line"></div>
<div class="line">        const <span class="keywordtype">char</span> segnale[] = &quot;clicked&quot;;</div>
<div class="line">        GtkWidget *etichetta = 0;</div>
<div class="line"></div>
<div class="line">        <span class="keywordtype">int</span> ora_inizio = inizio + (<a class="code" href="handler_8cc.html#afd4f3203e7d93c11312acfb3bd818b4d">ORA_APERTURA</a>)*60;</div>
<div class="line">        <span class="keywordtype">int</span> scarto_inizio = 60 - (inizio % 60);</div>
<div class="line">        <span class="keywordtype">int</span> scarto_fine = fine % 60;</div>
<div class="line">        <span class="keywordtype">int</span> ora_scarto_fine = fine - scarto_fine + ORA_APERTURA*60;</div>
<div class="line"></div>
<div class="line">        <span class="comment">//Di defualt le ore inizia al minuto 0 quindi controllo eventuali scarti</span></div>
<div class="line">        if (scarto_inizio != 60){</div>
<div class="line">                <a class="code" href="debug_8h.html#afff1e38d74b3116b7a77d0272adf2dbf" title="Mostra i vari passaggi fondamentali.">D1</a>(cout&lt;&lt;<span class="stringliteral">&quot;scarto_inizio&quot;</span>&lt;&lt;endl)</div>
<div class="line"></div>
<div class="line">                etichetta = GTK_WIDGET( gtk_button_new() );</div>
<div class="line">                g_signal_connect( G_OBJECT(etichetta), segnale, G_CALLBACK(<a class="code" href="handler_8cc.html#aab2674f9e310187d1f2718e13a440729" title="Mostra i dati dell&#39;ora.">handler_mostra_ora</a>), NULL );</div>
<div class="line">                g_object_set_data( G_OBJECT(etichetta), &quot;campo&quot;, campo);</div>
<div class="line">                g_object_set_data( G_OBJECT(etichetta), &quot;<a class="code" href="handler_8cc.html#ad2ef6a61f674ffd893c018201b796901">tipo_ora</a>&quot;, GINT_TO_POINTER( <a class="code" href="handler_8cc.html#ad2ef6a61f674ffd893c018201b796901a103e268eeab0324c0d636174572035c5">VUOTA</a> ) );</div>
<div class="line">                g_object_set_data( G_OBJECT(etichetta), &quot;ora&quot;, GINT_TO_POINTER(ora_inizio) );</div>
<div class="line">                </div>
<div class="line">                gtk_grid_attach(tabella, etichetta, inizio + 60, campo-&gt;numero, scarto_inizio, 1);</div>
<div class="line"></div>
<div class="line">                inizio += 60;</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        if (scarto_fine != 0){</div>
<div class="line">                <a class="code" href="debug_8h.html#afff1e38d74b3116b7a77d0272adf2dbf" title="Mostra i vari passaggi fondamentali.">D1</a>(cout&lt;&lt;<span class="stringliteral">&quot;scarto_fine&quot;</span>&lt;&lt;endl)</div>
<div class="line"></div>
<div class="line">                etichetta = GTK_WIDGET( gtk_button_new() );</div>
<div class="line">                g_signal_connect( G_OBJECT(etichetta), segnale, G_CALLBACK(handler_mostra_ora), NULL );</div>
<div class="line">                g_object_set_data( G_OBJECT(etichetta), &quot;campo&quot;, campo);</div>
<div class="line">                g_object_set_data( G_OBJECT(etichetta), &quot;tipo_ora&quot;, GINT_TO_POINTER( VUOTA ) );</div>
<div class="line">                g_object_set_data( G_OBJECT(etichetta), &quot;ora&quot;, GINT_TO_POINTER(ora_scarto_fine) );      </div>
<div class="line"></div>
<div class="line">                gtk_grid_attach(tabella, etichetta, (fine - scarto_fine + 60), campo-&gt;numero, scarto_fine, 1);</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        inizio = inizio + scarto_inizio;</div>
<div class="line">        fine = fine - scarto_fine;</div>
<div class="line"></div>
<div class="line">        while (inizio &lt;= fine){</div>
<div class="line">                <a class="code" href="debug_8h.html#a43e8ca05b2c0abb00d31e535b4186b7e" title="Mostra stato variabili ed errori veri e propri.">D2</a>(cout&lt;&lt;inizio&lt;&lt;endl)</div>
<div class="line">                ora_inizio = inizio + (ORA_APERTURA - 1)*60;</div>
<div class="line"></div>
<div class="line">                etichetta = GTK_WIDGET( gtk_button_new() );</div>
<div class="line">                g_signal_connect( G_OBJECT(etichetta), segnale, G_CALLBACK(handler_mostra_ora), NULL );</div>
<div class="line">                g_object_set_data( G_OBJECT(etichetta), &quot;campo&quot;, campo);</div>
<div class="line">                g_object_set_data( G_OBJECT(etichetta), &quot;tipo_ora&quot;, GINT_TO_POINTER( VUOTA ) );</div>
<div class="line">                g_object_set_data( G_OBJECT(etichetta), &quot;ora&quot;, GINT_TO_POINTER(ora_inizio) );</div>
<div class="line">                </div>
<div class="line">                gtk_grid_attach(tabella, etichetta, inizio, campo-&gt;numero, 60, 1);</div>
<div class="line"></div>
<div class="line">                inizio += 60;</div>
<div class="line">        }</div>
<div class="line">        </div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a3dfb1abf80d66926a17e6065559ea726"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void inserisci_righe_campi </td>
          <td>(</td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>campo_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>tabella_</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Aggiunge alla tabella le righe dei campi. </p>
<p>Per ogni campo aggiunge una riga alla tabella con il numero del campo </p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">campo_</td><td>Puntatore al campo </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">tabella_</td><td>Puntatore alla tabella </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line">{</div>
<div class="line">        <a class="code" href="structcampo__t.html" title="Struttura rappresentate i campi.">campo_t</a> *campo = (<a class="code" href="structcampo__t.html" title="Struttura rappresentate i campi.">campo_t</a> *) campo_;</div>
<div class="line">        GtkGrid *tabella = (GtkGrid *) tabella_;</div>
<div class="line">        <span class="keywordtype">char</span> *tmp = g_strdup_printf(<span class="stringliteral">&quot;%d&quot;</span>, campo-&gt;<a class="code" href="structcampo__t.html#a6e0a6002a8c0d360f22d4a30bc1e37d0">numero</a>);</div>
<div class="line">        GtkWidget *etichetta = GTK_WIDGET( gtk_label_new(tmp) );</div>
<div class="line">        </div>
<div class="line">        gtk_grid_insert_row(tabella, 1);</div>
<div class="line">        gtk_grid_attach(tabella, etichetta, 0, 1, 1, 1);</div>
<div class="line"></div>
<div class="line">        g_free(tmp);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a332b65c4735ded9b047d074bb8f2639b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void insert_list_campi </td>
          <td>(</td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>data_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>list_</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Inserisce il campo nella ListStore. </p>
<p>Fa una copia dei dati del campo nella ListStore </p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">data_</td><td>Puntatore al campo </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">list_</td><td>Puntatore alla ListStore </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line">{</div>
<div class="line">        GtkTreeIter iter;</div>
<div class="line">        <a class="code" href="structcampo__t.html" title="Struttura rappresentate i campi.">campo_t</a> *data = (<a class="code" href="structcampo__t.html" title="Struttura rappresentate i campi.">campo_t</a> *) data_;</div>
<div class="line">        GtkListStore *list = (GtkListStore *) list_;</div>
<div class="line"></div>
<div class="line">        <span class="keyword">const</span> <span class="keywordtype">char</span> *copertura = <a class="code" href="handler_8cc.html#a8333082ae85ce61a16c133d8da371716">coperture</a>[data-&gt;<a class="code" href="structcampo__t.html#a98a13af547edea0107d7def51feeb923">copertura</a>];</div>
<div class="line">        <span class="keyword">const</span> <span class="keywordtype">char</span> *terreno = <a class="code" href="handler_8cc.html#a951a8018f2da583e7a03b930fc58e237">terreni</a>[data-&gt;<a class="code" href="structcampo__t.html#ab875e984264bf393977eb07cfe2f7341">terreno</a>];</div>
<div class="line"></div>
<div class="line">        gtk_list_store_append(list, &amp;iter);</div>
<div class="line">        gtk_list_store_set(list, &amp;iter, </div>
<div class="line">                                0, data-&gt;<a class="code" href="structcampo__t.html#a6e0a6002a8c0d360f22d4a30bc1e37d0">numero</a>,</div>
<div class="line">                                1, copertura,</div>
<div class="line">                                2, terreno,</div>
<div class="line">                                3, data,</div>
<div class="line">                                -1);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a8bf2479da80daf509d7af3dca324e92c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void insert_list_giocatore </td>
          <td>(</td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>data_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>list_</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Inserisce il giocatore nella ListStore. </p>
<p>Fa una copia dei dati del giocatore nella ListStore </p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">data_</td><td>Puntatore al giocatore </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">list_</td><td>Puntatore alla ListStore </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line">{</div>
<div class="line">        GtkTreeIter iter;</div>
<div class="line">        <a class="code" href="structgiocatore__t.html" title="Struttura rappresentante i giocatori.">giocatore_t</a> *data = (<a class="code" href="structgiocatore__t.html" title="Struttura rappresentante i giocatori.">giocatore_t</a> *) data_;</div>
<div class="line">        GtkListStore *list = (GtkListStore *) list_;</div>
<div class="line"></div>
<div class="line">        gtk_list_store_append(list, &amp;iter);</div>
<div class="line">        gtk_list_store_set(list, &amp;iter, </div>
<div class="line">                                0, data-&gt;<a class="code" href="structgiocatore__t.html#ac3f1b0dcd6f3439adbc2e86db6bea952">nome</a>-&gt;str,</div>
<div class="line">                                1, data-&gt;<a class="code" href="structgiocatore__t.html#ad02b92861fc7ee234cad9bb5a730a408">cognome</a>-&gt;str,</div>
<div class="line">                                2, data-&gt;<a class="code" href="structgiocatore__t.html#a22cdca2a4d519bfbd64649d4f4cb266f">nascita</a>-&gt;str,</div>
<div class="line">                                3, data-&gt;<a class="code" href="structgiocatore__t.html#abac0936681f2728909612be2f0e47a46">classifica</a>-&gt;str,</div>
<div class="line">                                4, data-&gt;<a class="code" href="structgiocatore__t.html#a5275e8614d0c0d2270d0cf9929214ebf">circolo</a>-&gt;str,</div>
<div class="line">                                5, data-&gt;<a class="code" href="structgiocatore__t.html#ab483a08573f49ac1b96761f869921826">socio</a>,</div>
<div class="line">                                6, data-&gt;<a class="code" href="structgiocatore__t.html#aa9cd22efd9d0fa8a1de98dafcaeacdbd">retta</a>,</div>
<div class="line">                                7, data,</div>
<div class="line">                                -1);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="abef113ade0ebf32552faf22013fb51e6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mostra_finestra </td>
          <td>(</td>
          <td class="paramtype">GtkMenuItem *&#160;</td>
          <td class="paramname"><em>actived</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>finestra</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Mostra a video la finestra. </p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">finestra</td><td>Finestra da mostrare </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line">{</div>
<div class="line">        gtk_widget_show_all( GTK_WIDGET(finestra) );</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a3cea95cc33a7419edc4bc03872da2c2c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gboolean nascondi_finestra </td>
          <td>(</td>
          <td class="paramtype">GtkWidget *&#160;</td>
          <td class="paramname"><em>widget</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">GdkEvent *&#160;</td>
          <td class="paramname"><em>event</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Nasconde la finestra. </p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">widget</td><td>Finestra da nascondere. </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line">{</div>
<div class="line">        gtk_widget_hide(widget);</div>
<div class="line">        <span class="keywordflow">return</span> TRUE;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a258ab9e0f53bf7ca6ceff4985b713cc9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_active </td>
          <td>(</td>
          <td class="paramtype">GtkWidget *&#160;</td>
          <td class="paramname"><em>widget</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Setta sul primo elemento il ComboBox. </p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">widget</td><td>ComboBox </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line">{</div>
<div class="line">        gtk_combo_box_set_active( GTK_COMBO_BOX(widget), 0);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a1327446bd6ffbd129400ab552dfba9d0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void socio_toggle </td>
          <td>(</td>
          <td class="paramtype">GtkToggleButton *&#160;</td>
          <td class="paramname"><em>button</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Modifica i campi in base al bottone. </p>
<p>Attiva o disattiva i campi Retta Pagata e Circolo in base allo stato del bottone. </p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">button</td><td>Bottone </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line">{</div>
<div class="line">        GtkWidget *<a class="code" href="handler_8cc.html#afdb5d4cc28256fee3f79b189c6a6ef58">circolo</a> = GTK_WIDGET(gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;circolo_g&quot;</span>));</div>
<div class="line">        GtkToggleButton *retta = GTK_TOGGLE_BUTTON(gtk_builder_get_object(<a class="code" href="ACE_8cc.html#a25e58c3375b9bff39382bbe4c77c9355">build</a>, <span class="stringliteral">&quot;retta_g&quot;</span>));</div>
<div class="line">        <span class="keywordtype">bool</span> stato = gtk_toggle_button_get_active(button);</div>
<div class="line">        </div>
<div class="line">        <span class="keywordflow">if</span> (stato) {</div>
<div class="line">                gtk_toggle_button_set_inconsistent(retta, <span class="keyword">false</span>);</div>
<div class="line">                gtk_widget_set_sensitive(circolo, <span class="keyword">false</span>);</div>
<div class="line">        } <span class="keywordflow">else</span> {</div>
<div class="line">                gtk_toggle_button_set_inconsistent(retta, <span class="keyword">true</span>);</div>
<div class="line">                gtk_widget_set_sensitive(circolo, <span class="keyword">true</span>);</div>
<div class="line">        }</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<h2>Documentazione delle variabili</h2>
<a class="anchor" id="a25e58c3375b9bff39382bbe4c77c9355"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GtkBuilder* build</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="afdb5d4cc28256fee3f79b189c6a6ef58"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcircolo__t.html">circolo_t</a>* circolo</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a8333082ae85ce61a16c133d8da371716"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* coperture[] = {&quot;INDOOR&quot;, &quot;<a class="el" href="struttura__dati_8h.html#ad0f5a2191c29d4cd4c52506513493755a8c38e218bbbd030490bf90a71baad2b9">OUTDOOR</a>&quot;}</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a4498167a41f7467a5dddeb2bfaea59b6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char DATA_PATH[]</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a13fe06ea7d409828447a956f7e130977"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char ESTENSIONE_BACKUP[] = &quot;.abk&quot;</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="afd4f3203e7d93c11312acfb3bd818b4d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const int ORA_APERTURA = 8</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="af45dc783e55c4fd9bcebf41135fe5da9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const int ORA_CHIUSURA = 23</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a951a8018f2da583e7a03b930fc58e237"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* terreni[] = {&quot;ERBA&quot;, &quot;<a class="el" href="struttura__dati_8h.html#a0c12af1750520ca1d5e0a1b120ed33b7a772329657a044e6e767b6016feb1e23c">ERBA</a> SINTETICA&quot;, &quot;<a class="el" href="struttura__dati_8h.html#a0c12af1750520ca1d5e0a1b120ed33b7af716ec1950763e4a93a6a0b029dc9ca5">TERRA</a>&quot;, &quot;<a class="el" href="struttura__dati_8h.html#a0c12af1750520ca1d5e0a1b120ed33b7a6846ea149ed5fe29f199e562567a1ddb">SINTETICO</a>&quot;, &quot;<a class="el" href="struttura__dati_8h.html#a0c12af1750520ca1d5e0a1b120ed33b7ae110ec4d5d1ec9bff232bf97b86c8a5a">CEMENTO</a>&quot;}</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generato Mer 8 Ott 2014 19:12:40 per ACE da &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.2
</small></address>
</body>
</html>
